nanogui: Re: Mapping, Unmapping...PLEASE DISREGARD DUMB RESPONSE
Subject:
Re: [nanogui] Mapping, Unmapping...PLEASE DISREGARD DUMB RESPONSE
From:
Gil Glass ####@####.####
Date:
14 Feb 2006 15:25:45 +0000
Message-Id: <OF723804A0.5A37A3F3-ON85257115.005459B4-85257115.0054B437@acterna.com>
There ought to be a law against typing before having coffee. :-)
The window the I refer to as "parent" in the code snippet that appears
below IS NOT, in fact, the root window. When I create the original window
much earlier in the code, ITS parent is the root window. Then, when I
create the window in the code snippet at appearing below, its parent is
the CHILD OF the root window.
Sorry.
Gil Glass
Telecom Field Services
JDSU
Germantown, MD, USA
+1-240-404-2551
Please note new e-mail address: ####@####.#### While the Acterna
address will continue to work for a while, please begin using the JDSU
address instead.
"Greg Haerr" ####@####.####
02/13/2006 11:57 PM
Please respond to
"Greg Haerr" ####@####.####
To
####@####.#### "Gil Glass" ####@####.####
cc
Subject
Re: [nanogui] Mapping, Unmapping, and Repainting Windows
: Correct me if I'm wrong, but if I have a window (the root window), whose
: window ID is "parent", that is currently displaying and takes up the
: entire display, and I then perform the following operations:
Call your parent window "parent", because the root window
is something else (it's always id 1, and always mapped). I
presume you're not talking about the real root window.
In the code below, you never mapped your parent window in the
first place, and then mapped it again. Nano-X keeps
a map count which could get confused if your map/unmap
calls don't match up.
Regards,
Greg
:
: // Create and open a new window.
: windowID = GrNewWindow(parent, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0,
: GR_COLOR_WHITE, GR_COLOR_WHITE);
:
: // Map (show) the window.
: GrMapWindow(windowID);
:
: <draw some stuff>
:
: // Remove this window.
: GrUnmapWindow(windowID);
: GrDestroyWindow(windowID);
:
: // Redraw the parent window.
: GrMapWindow(parent);
:
: I should get my original, root window back, should I not? Well I'm not.
: Any idea of what I'm doing wrong? I'm using Nano-X version 0.91.
:
: Cheers,
: Gil Glass
: Telecom Field Services
: JDSU
: Germantown, MD, USA
: +1-240-404-2551