discuss-gnustep
[Top][All Lists]
Advanced

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

Re: focus problem


From: Fred Kiefer
Subject: Re: focus problem
Date: Thu, 16 Aug 2007 16:20:04 +0200
User-agent: Thunderbird 1.5.0.12 (X11/20060911)

Andreas Höschler wrote:
> Hi Fred,
> 
>> I don't quit understand what you are suggesting here. And the original
>> code here is not to clear by itself.
>> I think we may have four cases that this code needs to handle: The
>> application may be active or not and it may be hidden or not.
>> In all these four cases there may be a suitable window to make key or
>> not.
>> In the end we expect that the application is activated unhidden and a
>> suitable window made key.
>> We already have a call to unhide: here, this will activate the
>> application if it isn't active already.
>>
>> case active + unhidden
>> unhide: gets called, but nothing happens
>>
>> case active + hidden
>> windows get reorder, unhide: gets called, hidden windows get displayed
>>
>> case inactive + unhidden
>> unhide gets called, this calls activateIgnoringOtherApps:
>>
>> case inactive + hidden
>> windows get reorder, unhide: gets called, hidden windows get displayed,
>> activateIgnoringOtherApps: gets called
>>
>> As far as I can see this is OK. It may not be the best way to structure
>> the code. I think it would be better to put the windows reordering into
>> unhideWithoutActivation. But which part of this is causing you problems.
>>
>> Or is it only the issue, when there is no suitable key window? This
>> really is a problem, but moving or changing code in mouseEvent: wont
>> solve it.
> 
> Yes, that's exacly the case I mean. Under GNUstep, OPENSTEP, MacOSX it
> is totally legal and the normal case that an application has no windows
> open, just the menu. After strating the applicationthe user can then
> decide to do Command-o for opening a file or di Command-n for creating a
> new document. That's exactlly the case I have a problem with. I
> doubleclick on the app icon of an application and expect the application
> to become active (--> EtoileMenuServer) and get key focus. But that does
> not happen! :-(
> 

If this is your only problem, then I might just have found a solution
for it. In [XGServer _setupRootWindow] the variable lastTime was set to
1, which resulted in the first setinputfocus call before any other event
to be ignored. After changing this value to CurrentTime (0) it seems to
work.

Please give it a try.
Fred




reply via email to

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