nanogui: Re: about Windows redraw


Previous by date: 15 Jul 2002 09:43:55 -0000 About flnx, xgzhang
Next by date: 15 Jul 2002 09:43:55 -0000 Re: Starting Nano-X on /dev/fb1 problem, jonathan.foster.philips.com
Previous in thread: 15 Jul 2002 09:43:55 -0000 Re: about Windows redraw, wang
Next in thread: 15 Jul 2002 09:43:55 -0000 Re: about Windows redraw, wang

Subject: Re: [nanogui] Fw: about Windows redraw
From: Alex Holden ####@####.####
Date: 15 Jul 2002 09:43:55 -0000
Message-Id: <3D329659.7060600@linuxhacker.org>

wang wrote:
> =09If you are using nanowm ,you will see clearly
> that the window is redraw for the second time when 
> be creted. first for the event GR_UPDATE_MAP,and 
> later for the event GR_EVENT_TYPE_EXPOSURE,the first 
> event is responded by the child window,and trigger
> the EXPOSURE event ,nanomw get the event ,and draw 
> the container, because the original window is children
> of the container ,so it should be redraw for the 
> second time.

There is a (slightly ugly but working) solution for this in my CVS tree.
You can get it from here:
http://www.linuxhacker.org/pub/cvs-snapshots/microwin-aph/

The way it works is that the client has a bit of code which looks like this:

GR_COORD y = 0, x = 0;

if(GrGetWindowProperty(GR_ROOT_WINDOW_ID, "WINDOW_MANAGER", &prop)) {
   free(prop);
   x = GR_OFF_SCREEN;
}

The window manager creates the WINDOW_MANAGER property when it starts up.

x and y x are then used as the position of the window when it is
created. If there is no window manager running, it will be placed at
0,0. If the window manager is running, it will be placed off the screen.
The window manager then reparents the window and moves it to somewhere
on the screen. Because the location of the first mapping was not
visible, you don't see the window get drawn twice.

-- 
------------ Alex Holden - http://www.linuxhacker.org ------------
If it doesn't work, you're not hitting it with a big enough hammer


Previous by date: 15 Jul 2002 09:43:55 -0000 About flnx, xgzhang
Next by date: 15 Jul 2002 09:43:55 -0000 Re: Starting Nano-X on /dev/fb1 problem, jonathan.foster.philips.com
Previous in thread: 15 Jul 2002 09:43:55 -0000 Re: about Windows redraw, wang
Next in thread: 15 Jul 2002 09:43:55 -0000 Re: about Windows redraw, wang


Powered by ezmlm-browse 0.20.