diff options
author | Sven Gothel <[email protected]> | 2015-09-29 11:25:33 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-09-29 11:25:33 +0200 |
commit | f607c0148736fa198fb91b60123824e53366022e (patch) | |
tree | 44dc3b8d72df0efca2d388dbd57d69491ba975c5 /src/newt/classes/jogamp | |
parent | 2b70c6bc965b3939a7f27b5b073282f34bc5200f (diff) |
Bug 1205 - NEWT Security: Clear framebuffer after creation and before visibility (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.
Diffstat (limited to 'src/newt/classes/jogamp')
-rw-r--r-- | src/newt/classes/jogamp/newt/WindowImpl.java | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java index 07a95f5a8..a10cd0b4e 100644 --- a/src/newt/classes/jogamp/newt/WindowImpl.java +++ b/src/newt/classes/jogamp/newt/WindowImpl.java @@ -4662,12 +4662,26 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer // /** Triggered by implementation's WM events to update the client-area position, size, insets and maximized flags. */ - protected void sizePosMaxInsetsChanged(final boolean defer, - final int newX, final int newY, - final int newWidth, final int newHeight, - final boolean newMaxHorz, final boolean newMaxVert, - final int left, final int right, final int top, final int bottom, - final boolean force) { + protected final void sizePosInsetsFocusVisibleChanged(final boolean defer, + final int newX, final int newY, + final int newWidth, final int newHeight, + final int left, final int right, final int top, final int bottom, + final boolean focusGained, + final boolean visible, + final boolean force) { + sizeChanged(defer, newWidth, newHeight, force); + positionChanged(defer, newX, newY); + insetsChanged(defer, left, right, top, bottom); + focusChanged(defer, focusGained); + visibleChanged(defer, visible); + } + /** Triggered by implementation's WM events to update the client-area position, size, insets and maximized flags. */ + protected final void sizePosMaxInsetsChanged(final boolean defer, + final int newX, final int newY, + final int newWidth, final int newHeight, + final boolean newMaxHorz, final boolean newMaxVert, + final int left, final int right, final int top, final int bottom, + final boolean force) { sizeChanged(defer, newWidth, newHeight, force); positionChanged(defer, newX, newY); maximizedChanged(newMaxHorz, newMaxVert); |