Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Custom window aero effects disabled if FramelessWindowHint set

Qt Custom window aero effects disabled if FramelessWindowHint set

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 1.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 0 Offline
    0 Offline
    0x1337
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      1
      • 0 Offline
        0 Offline
        0x1337
        wrote on last edited by 0x1337
        #3

        @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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved