Qt Custom window aero effects disabled if FramelessWindowHint set



  • Hi,

    I created a custom window, i re-created the event to move the window, everything works fine... But when the window is displayed there are none effects (by default there are a very little fade in/out effects, same for minimizing).

    Any idea how to put it back?

    Thanks.


  • Moderators

    TL;DR It's complicated. There's a lot lot lot more to frameless windows than just moving and resizing them correctly.

    This topic comes back in one or another form quite often on the forum. I remember discussion on it as far back as 3 or even 5 years ago. Have a search on frameless windows or custom frame border (I know that's not what you ask but it's heavily related).

    As soon as you disable the frame it's an uphill battle against the window manager. The thing is that various aero affects (snap, peek, animations and more) are triggered by presence of certain flags in the frame description, most noticeably WS_THICK_FRAME. Disabling the frame effectively turns them all off. The thing is if you want aero stuff you need a frame. No way around it.
    The hackerish workarounds that I've seen are usually based on not disabling the frame but instead extending the client area over the frame and overpainting the borders + a lot of tinkering with low level windows messaging.



  • @Chris-Kawa said in Qt Custom window aero effects disabled if FramelessWindowHint set:

    TL;DR It's complicated. There's a lot lot lot more to frameless windows than just moving and resizing them correctly.

    This topic comes back in one or another form quite often on the forum. I remember discussion on it as far back as 3 or even 5 years ago. Have a search on frameless windows or custom frame border (I know that's not what you ask but it's heavily related).

    As soon as you disable the frame it's an uphill battle against the window manager. The thing is that various aero affects (snap, peek, animations and more) are triggered by presence of certain flags in the frame description, most noticeably WS_THICK_FRAME. Disabling the frame effectively turns them all off. The thing is if you want aero stuff you need a frame. No way around it.
    The hackerish workarounds that I've seen are usually based on not disabling the frame but instead extending the client area over the frame and overpainting the borders + a lot of tinkering with low level windows messaging.

    Thanks a lot for your reply.

    I tried to leave FramelessWindowHint flags, the window is working with aero effect, BUT when i try to move the window by the top of the window the application is moved a bit i don't know how to explain (and how to fix that issue, i'm building a custom window). I think i have this choice OR remove that flag and remake the animation using some fade in/out animations...

    I don't know how to explain the issue i make a gif look:

    https://gyazo.com/f04ab4e3d9ea567fabfad349061fae18

    That happen if i don't set FramelessWindowHint, but except that everything works and i don't know how to fix.

    Thanks a lot.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.