nanogui: active window in nanowm


Previous by date: 18 Jan 2001 17:16:04 -0000 nanowm- GrSetFocus, Amit Kulkarni
Next by date: 18 Jan 2001 17:16:04 -0000 Re: active window in nanowm, Jordan Crouse
Previous in thread:
Next in thread: 18 Jan 2001 17:16:04 -0000 Re: active window in nanowm, Jordan Crouse

Subject: active window in nanowm
From: "Amit Kulkarni" ####@####.####
Date: 18 Jan 2001 17:16:04 -0000
Message-Id: <F26h6nB2J4XtliS01qC000024bf@hotmail.com>

hi,

I think there might be some scope for improvement with the way the window 
topbaris painted by nanowm.
In the redraw_ncarea function (actions.c line #20) it calls

active = (window->clientid == GrGetFocus());
nxPaintNCArea(window->wid, info.width, info.height, props.title,active, 
props.props);

where depending on the status of the "active" parameter the nxPaintNCArea 
decides the colour of the topbar.

	I think that it should possibly do a depth first search on the window tree 
starting at window->clientid and if any of the children is == to 
GrGetFocus() then active should be kept true.

i.e.

[Window 1] has child [Window 2]
now focus is currently set to [Window2] (which needs it since it is a text 
box or the like :-) )
[Window1] is listed with nanowm (because it is a child of GR_ROOT_WINDOW_ID)
But now active will not be true according to the old algorithm :-(

Since, this searching is a very heavyweight idea i suggest that the nanowm
keep a pointer to the currently active window and update it everytime. Maybe 
you can work out some sort of an algorithm this way.

Regards,
Amit Kulkarni
Visit me at http://www.amitkulkarni.com

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


Previous by date: 18 Jan 2001 17:16:04 -0000 nanowm- GrSetFocus, Amit Kulkarni
Next by date: 18 Jan 2001 17:16:04 -0000 Re: active window in nanowm, Jordan Crouse
Previous in thread:
Next in thread: 18 Jan 2001 17:16:04 -0000 Re: active window in nanowm, Jordan Crouse


Powered by ezmlm-browse 0.20.