diff options
author | Sven Gothel <[email protected]> | 2015-10-01 23:36:54 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-10-01 23:36:54 +0200 |
commit | a9b3f6d13b45284e81b91a1e1e31b35c31dd3670 (patch) | |
tree | 1a2550bc440cb27476d9d9a328600dc4b5fb296b /src/jogl/classes | |
parent | 4b0be44f54a7d89192c03725a16e396eba98a712 (diff) |
Bug 1232 - NEWT Translucent Decorated Windows Not Working On Windows >= 8 (Lack of Aero / Blur )
Adopting new undocumented user32.dll Windows >= 8 API:
- SetWindowCompositionAttribute / AccentState
See:
- <https://github.com/riverar/sample-win10-aeroglass/blob/master/MainWindow.xaml.cs>
- <http://withinrafael.com/adding-the-aero-glass-blur-to-your-windows-10-apps/>
- <http://undoc.airesoft.co.uk/user32.dll/SetWindowCompositionAttribute.php>
- <http://undoc.airesoft.co.uk/user32.dll/GetWindowCompositionAttribute.php>
+++
Cleaning up WindowsDWM.h, use on header file (in stub_includes)
for GlueGen and implementation.
+++
Merge java implementation within GDIUtil.DwmSetupTranslucency(..),
to be utilized by NEWT and JOGL.
NEWT issues GDIUtil.DwmSetupTranslucency(..) at creation
and when toggling decoration.
Toggling decoration on Win >= 8 leads to lost of translucency
when returning to decorated window.
On Win 7, this may work .. but is also buggy.
+++
Followup patch is needed for NEWT to _not_ clear the background!
Diffstat (limited to 'src/jogl/classes')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java index f88718d1b..4ffe6e7d1 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java @@ -171,24 +171,7 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio ": error code " + GDI.GetLastError()); } if( !caps.isBackgroundOpaque() ) { - final long hwnd = GDI.WindowFromDC(hdc); - final DWM_BLURBEHIND bb = DWM_BLURBEHIND.create(); - bb.setDwFlags(GDI.DWM_BB_ENABLE| GDI.DWM_BB_TRANSITIONONMAXIMIZED); - bb.setFEnable( 1 ); - boolean ok = GDI.DwmEnableBlurBehindWindow(hwnd, bb); - if( ok ) { - final MARGINS m = MARGINS.create(); - m.setCxLeftWidth(-1); - m.setCxRightWidth(-1); - m.setCyBottomHeight(-1); - m.setCyTopHeight(-1); - ok = GDI.DwmExtendFrameIntoClientArea(hwnd, m); - } - if(DEBUG) { - final boolean isUndecorated = GDIUtil.IsUndecorated(hwnd); - final boolean isChild = GDIUtil.IsChild(hwnd); - System.err.println("translucency enabled on wnd: 0x"+Long.toHexString(hwnd)+" - isUndecorated "+isUndecorated+", isChild "+isChild+", ok: "+ok); - } + GDIUtil.DwmSetupTranslucency(GDI.WindowFromDC(hdc), true); } if (DEBUG) { System.err.println("setPixelFormat: hdc "+toHexString(hdc) +", "+caps); |