[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Window Mapping & Unmapping Revisited
From: Gil Glass ####@####.#### Date: 8 Mar 2006 15:43:53 +0000 Message-Id: <OFE2513F17.583EE433-ON8525712B.00502756-8525712B.00566787@acterna.com> Hello, I asked this question once before but not very articulately. Then I then went on vacation and moved on to other issues. Anyway, back to the original question: Correct me if I'm wrong, but if I have a window, the root window, that is currently displaying and takes up the entire display, and I then perform the following operations: // ... <Do lots of drawing on the root window until...> // ... // Create and open a NEW window whose PARENT is the ROOT window. windowID = GrNewWindow(GR_ROOT_WINDOW_ID, 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); ...then at this point, should the contents of the root window not be redisplayed? Please forgive my naïveté, but do I have to use the window manager (nanowm) to make this happen? Cheers, Telecom Field Services JDSU Germantown, MD, USA +1-240-404-2551 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: Window Mapping & Unmapping Revisited
From: "Aaron J. Grier" ####@####.#### Date: 8 Mar 2006 19:15:00 +0000 Message-Id: <20060308191457.GG20104@mordor.unix.fryenet> On Wed, Mar 08, 2006 at 10:43:46AM -0500, Gil Glass wrote: > // ... > <Do lots of drawing on the root window until...> > // ... > > // Create and open a NEW window whose PARENT is the ROOT window. > windowID = GrNewWindow(GR_ROOT_WINDOW_ID, 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); > > ...then at this point, should the contents of the root window not be > redisplayed? only if you've set it up that way. (: > Please forgive my naïveté, but do I have to use the window manager > (nanowm) to make this happen? after your window is drawn and erased, nano-X will generate an expose event to the root window, telling it which area(s) need to be redrawn. the window manager checks for these events and does appropriate notifications/callbacks to get things done. if you're using a backing-store (offscreen) buffer, these expose events are straightforward GrCopyArea calls. if you don't have backing store, you'll need to regenerate the missing data somehow. nanowm is one way to handle these sorts of events. -- Aaron J. Grier | Frye Electronics, Tigard, OR | ####@####.#### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] Re: Window Mapping & Unmapping Revisited
From: "Greg Haerr" ####@####.#### Date: 8 Mar 2006 23:17:24 +0000 Message-Id: <0cec01c64306$687969d0$6401a8c0@winXP> : > ...then at this point, should the contents of the root window not be : > redisplayed? As Aaron wrote, whenever a previously hidden portion of any window is able to be displayed, the nano-X server (not the window manager) generates the appropriate expose events and sends them to the appropriate windows. The windows are then responsible to redraw portions of the newly-exposed window. If the window does not have the NOBACKGROUND bit set, then nano-X will clear the exposed area to the background color specified in the GrNewWindow call, before sending the expose event. The nanowm window manager will normally set the root window's background color to green, rather than black, so when its running, the background color is different. The window manager intercepts map events to draw a container around the window, making it look like a windows or linux "window". Other than that, the window manager doesn't interfere with drawing any portion of the insides of any window. Regards, Greg : : only if you've set it up that way. (: : : > Please forgive my naïveté, but do I have to use the window manager : > (nanowm) to make this happen? : : after your window is drawn and erased, nano-X will generate an expose : event to the root window, telling it which area(s) need to be redrawn. : the window manager checks for these events and does appropriate : notifications/callbacks to get things done. if you're using a : backing-store (offscreen) buffer, these expose events are : straightforward GrCopyArea calls. if you don't have backing store, : you'll need to regenerate the missing data somehow. : : nanowm is one way to handle these sorts of events. : : -- : Aaron J. Grier | Frye Electronics, Tigard, OR | ####@####.#### : : --------------------------------------------------------------------- : To unsubscribe, e-mail: ####@####.#### : For additional commands, e-mail: ####@####.#### : : | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |