discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Window Focus Problem (was Re: GNUstep Window Manager (was RE: I dea)


From: Richard Frith-Macdonald
Subject: Re: Window Focus Problem (was Re: GNUstep Window Manager (was RE: I dea))
Date: Sun, 21 Jan 2001 16:44:43 +0000

On Wednesday, January 10, 2001, at 02:36 AM, Dan Pascu wrote:

> What puzzles me is that there is code to treat a gnustep app in a very 
> particular way regarding focus. This means that a gnustep app: 
> 1. Will not get focused. 
> 2. will never get its titlebar texture updated conforming to its 
>    focused/unfocused state. 
>  
> In other words its treated as it never exists. 
>  
> I wasn't able to figure out why this behavior is necessary, and none of 
> the wmaker developers put the code to do this in wmaker. 
> Alfredo told me that the code to do this was sent by you as a patch and 
> was added without modifications. 

I finally gout round to getting a build of wmaker working on my system,
and had a look at the state of the code.

There were two distinct sets of gnustep specific focus changes ...
In window.c, there were changes to prevent wmaker updating the window titlebar
on focus change  ... I remember adding these.
In actions.c there were changes to prevent wmaker handling focus changes at all 
...
I don't remember adding these, and think they are wrong.

After testing out a few apps with the gnustep focus mods in the actions.c 
removed,
I removed these changes from the CVS code.  This appears to leave titlebar color
changes operating correctly, and fixes the focus bug (so far as I could see).

However, I tried looking at the TAKE_FOCUS support in GNUstep - and it seems 
that
wmaker is sending the take focus client message with a window set to the menu of
the GNUstep app ... when I click on another window!

I'm not sure what the correct handling of take focus is ... but the current
GNUstep code expects to receive a take focus message set to the window that
has been clicked on.  Unless there is a better way to do this, I'm going to
try writing some code to determine the mouse position, and find out which
window the mouse pointer is in when a take focus message arrives - this ought
to enable the GNUstep app to simulate a mouse click on that window, and 
therefore
make that the key window (and set input focus to it) when it should.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]