diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2013-08-25 17:00:46 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-28 09:33:46 +0200 |
commit | a79e42b8f40317f7275b26637e6735754b21727f (patch) | |
tree | 148b0a51b1da449bc909c7ae66ea882046011ebd /src/plugins/platforms/windows/qtwindowsglobal.h | |
parent | 9de144f4b15b1b97d55922e3e0bc846080c5bb62 (diff) |
Enable DWM transparency for OpenGL windows under Windows
Starting with Windows Vista, we can control the compositing window
manager using the DWM APIs. This allows us to make truly transparent
OpenGL windows.
We also have to detect and listen if compositing is enabled, otherwise
enabling transparency will cause glitches all over the place.
This (partially) fixes
Task-number: QTBUG-28214
Change-Id: I0fe1ec7adec8181b788c32de03c59142731d9e7f
Done-with: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qtwindowsglobal.h')
-rw-r--r-- | src/plugins/platforms/windows/qtwindowsglobal.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qtwindowsglobal.h b/src/plugins/platforms/windows/qtwindowsglobal.h index 64bf1d71ca..e9eb50799e 100644 --- a/src/plugins/platforms/windows/qtwindowsglobal.h +++ b/src/plugins/platforms/windows/qtwindowsglobal.h @@ -105,6 +105,7 @@ enum WindowsEventType // Simplify event types InputMethodCloseCandidateWindowEvent = InputMethodEventFlag + 5, InputMethodRequest = InputMethodEventFlag + 6, ThemeChanged = ThemingEventFlag + 1, + CompositionSettingsChanged = ThemingEventFlag + 2, DisplayChangedEvent = 437, SettingChangedEvent = DisplayChangedEvent + 1, ContextMenu = 123, @@ -201,6 +202,8 @@ inline QtWindows::WindowsEventType windowsEventType(UINT message, WPARAM wParamI return QtWindows::DisplayChangedEvent; case WM_THEMECHANGED: return QtWindows::ThemeChanged; + case WM_DWMCOMPOSITIONCHANGED: + return QtWindows::CompositionSettingsChanged; #ifndef QT_NO_CONTEXTMENU case WM_CONTEXTMENU: return QtWindows::ContextMenu; |