From 3a3bbd87955321d790ba0f63402c573047304b1a Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 14 Mar 2014 07:26:51 +0100 Subject: Doc NEWT-Overview: Add notion about Window Parenting --- doc/NEWT-Overview.html | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) (limited to 'doc') diff --git a/doc/NEWT-Overview.html b/doc/NEWT-Overview.html index 4f8f71870..953f95b54 100644 --- a/doc/NEWT-Overview.html +++ b/doc/NEWT-Overview.html @@ -113,6 +113,62 @@ See it alive her [v2.0-rc3] --> +

Native Window Reparenting Details

+ +NEWT's reparenting algorithm only issues a destroy if: + + +In case destroy is issued, recreation will follow +as soon as the new parent window handle becomes available +or the instant if becoming a top-level window. + +

+In case destroy must be issued, the hint REPARENT_HINT_BECOMES_VISIBLE +will preserve the GLState at destroy, see below. +

+ +

+To avoid destroy and the GLState preservation, +the NEWT window shall simply be reparented before +parent's destruction. This is true for 'window hopping' +as well as child->top transition. + +See TestParenting04AWT for example .. +

+ + +
Using GLState Preservation
+ +A preserved GLState will be recovered when the resource gets recreated, +e.g. the parent window becomes visible again. +This mechanism exists to sooth the destroy case. + +See: GLStateKeeper, GLEventListenerState + +Regularly Used in the following use cases: + + +

How to pass user input back to the rendering loop ?

The following example shows you how to use a fifo to pipe events from the EDT (listener) to the rendering loop. -- cgit v1.2.3