nanogui: Re: about Windows redraw


Previous by date: 16 Jul 2002 08:34:14 -0000 Re: Current plans for Microwindows, Greg Haerr
Next by date: 16 Jul 2002 08:34:14 -0000 terminating windows, Fergal Kelly
Previous in thread: 16 Jul 2002 08:34:14 -0000 Re: about Windows redraw, Alex Holden
Next in thread: 16 Jul 2002 08:34:14 -0000 Re: about Windows redraw, Alex Holden

Subject: Re: Re: [nanogui] Fw: about Windows redraw
From: "wang" ####@####.####
Date: 16 Jul 2002 08:34:14 -0000
Message-Id:

Alex!

	This is a way to avoid seeing the client window
be drawn two times,but this only solve the sight
problem,in fact ,the window still be drawn for two
times.
    Every time if we want to run a graphic program 
base on nano-X ,we always let nanowm run too.so we 
can set the window anywhere ,it's so convenient .
window manager have the equal importance as the graphic
server,but everyone can find that when we drag  a 
window base on nano-X ,it's slower than the we drag
window which base on mwin,the reason is very obvious--we 
have travelled  an extra road ,in mwin the dragging 
be dealt with by itself,no extra communication ,no 
extra program,but in nano it's not.
    Some events which should be dealt with by wm,
and this events don't have impact  on the client.
and we can call most of them globle event ,so putting 
the serve fuction out of graphic server is very 
out of place.
    To let window dragging and window management 
more quickly,I suggest we should put window management
in the graphic server.when we creat a window with 
Grnewwindow(),it shoud create a containner too.every
window should have a containner as its parent,make it 
to be the basic element of a window ,so we can draw 
the window for only one time .and we alse should put 
some event serve fuction inside graphic server,such 
as when we drag the window ,when we make certain window
uncovered.
    anybady have some suggestion ,please let me know.

    

======= 2002-07-15 10:31:00 =======

>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

= = = = = = = = = = = = = = = = = = = =
			

        wang
####@####.####
          2002-07-16





Previous by date: 16 Jul 2002 08:34:14 -0000 Re: Current plans for Microwindows, Greg Haerr
Next by date: 16 Jul 2002 08:34:14 -0000 terminating windows, Fergal Kelly
Previous in thread: 16 Jul 2002 08:34:14 -0000 Re: about Windows redraw, Alex Holden
Next in thread: 16 Jul 2002 08:34:14 -0000 Re: about Windows redraw, Alex Holden


Powered by ezmlm-browse 0.20.