Summary: | NEWT Security: Clear onscreen Window content after creation and before visibility | ||
---|---|---|---|
Product: | [JogAmp] Newt | Reporter: | Sven Gothel <sgothel> |
Component: | core | Assignee: | Sven Gothel <sgothel> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | xerxes, xerxes |
Priority: | --- | ||
Version: | 2.3.2 | ||
Hardware: | All | ||
OS: | all | ||
Type: | FEATURE | SCM Refs: |
ee2fea13b20644e45c77f12a8b6d6f55941c27c8
f607c0148736fa198fb91b60123824e53366022e
f60bc2eb827a89d5d26d7348761da268306c0623
|
Workaround: | --- | ||
Bug Depends on: | |||
Bug Blocks: | 1178, 1206 |
Description
Sven Gothel
2015-08-28 00:36:03 CEST
ee2fea13b20644e45c77f12a8b6d6f55941c27c8 X11Window.c: Adding CWBackPixel BlackPixel(..) resulting in an initial black window (zero). com.jogamp.opengl.test.junit.newt.TestWindows02NEWT shows the content w/ opaque background and transparent one. Note: To be able to receive a transparent background, one needs to utilize a compositor WM (e.g. KWin w/ effects enabled). Due to commit cf9e2f2cb8ead7efd7751dcbfaecb36ed06cf9d6 (Bug 1210) this works in pure NEWT mode w/o utilizing GLX. (In reply to comment #1) > ee2fea13b20644e45c77f12a8b6d6f55941c27c8 > > X11Window.c: > > Adding CWBackPixel BlackPixel(..) resulting in an initial black window > (zero). > > com.jogamp.opengl.test.junit.newt.TestWindows02NEWT shows the content > w/ opaque background and transparent one. > Note: To be able to receive a transparent background, > one needs to utilize a compositor WM (e.g. KWin w/ effects enabled). > > Due to commit cf9e2f2cb8ead7efd7751dcbfaecb36ed06cf9d6 (Bug 1210) > this works in pure NEWT mode w/o utilizing GLX. This commit have un-blocked 1178, thank you! https://jogamp.org/bugzilla/show_bug.cgi?id=1178#c12 commit f607c0148736fa198fb91b60123824e53366022e NEWT Windows Onscreen WindowsWindow.c: - WindowUserData.isInCreation set while window at initizalization, i.e. before final size/pos/visibility. Also no visibility until final NewtWindow_setVisiblePosSize(..) call. This is possible since even w/o ShowWindow upfront, UpdateInsets(..) is able to gather accurate values. - Suppress any Java callback while WindowUserData.isInCreation, issue one callback when window is final. Use newly accumulated callback WindowImpl.sizePosInsetsFocusVisibleChanged(..) - While WindowUserData.isInCreation, WM_PAINT triggers WM_ERASEBKGND and WM_ERASEBKGND actually erases background w/ window background color. OSX does clean the content of the initial framebuffer (NSView), hence no change required here. The proprietary BCM VC IV seems to have cleared all allocated layers, as reported by Xerxes. (In reply to Sven Gothel from comment #3) > commit f607c0148736fa198fb91b60123824e53366022e > > NEWT Windows Onscreen > > WindowsWindow.c: > - WindowUserData.isInCreation set while window at initizalization, > i.e. before final size/pos/visibility. > > Also no visibility until final NewtWindow_setVisiblePosSize(..) call. > This is possible since even w/o ShowWindow upfront, > UpdateInsets(..) is able to gather accurate values. > > - Suppress any Java callback while WindowUserData.isInCreation, > issue one callback when window is final. > Use newly accumulated callback > WindowImpl.sizePosInsetsFocusVisibleChanged(..) > > - While WindowUserData.isInCreation, WM_PAINT triggers WM_ERASEBKGND > and WM_ERASEBKGND actually erases background w/ window background color. commit f60bc2eb827a89d5d26d7348761da268306c0623 Revert clear background to support fix for Bug 1232: NEWT Translucency Windows >= 8 Reverting 'clear backrgound' portion of commit f607c0148736fa198fb91b60123824e53366022e. It has been identified, that Windows does initialize onscreen windows (i.e. w/ white/DESKTOP color). This is also required for allowing translucent windows, since clearing the background intefers on Windows >= 8 (undecorated windows). |