gnustep-dev
[Top][All Lists]
Advanced

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

Re: Some problems with popup menus when these should process events


From: Fred Kiefer
Subject: Re: Some problems with popup menus when these should process events
Date: Sun, 04 Nov 2012 20:17:13 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121025 Thunderbird/16.0.2

On 04.11.2012 18:12, Germán A. Arias wrote:
El dom, 04-11-2012 a las 17:43 +0100, Fred Kiefer escribió:
On 03.11.2012 06:19, Germán A. Arias wrote:
Currently is possible configure a theme to process event in popup menus.
However, if this popup menu is at a window/panel in a modal session. The
popup is displayed, but this is unable to process the events. This
remains displayed and you should restart the app to remove this from the
screen. You can test this on Ink, when save the document and selects the
type of the document.

With which theme does this behaviour occur? I tried with the default
GNUstep theme and things seem to work as expected.


Currently there isn't a theme that use it. But you can try with Silver
theme. Download the source code:

http://download.gna.org/gnustep-nonfsf/silver.theme-2.5.tar.gz

And then edit the file Theme.m to add:

- (BOOL) doesProcessEventsForPopUpMenu
{
   return YES;
}

And compile it. If you test it with SystemPreferences, in section
"Modifier keys" it works perfectly. But no with Ink when you try to
select other type of file.

I am no expert here, and to state that once more, I would prefer if themes would restrict themselves to drawing changes not behaviour changes. Greg should be the one to jump in and explain why things behave the way they do. That said, I am not surprised that this theme change leads to popups that don't respond. When the doesProcessEventsForPopUpMenu method returns true the normal event handling of the popup button gets disabled. What we do normally is to cook up an event that gets passed to the opened menu and triggers mouse tracking there. If this does not happen, events may or may not end up in the opened popup menu. What you could try to do here is to set the setWorksWhenModal: property of the popup menu window. But even if this works it is only a workaround. You should actually be handling the events yourself, if you state that you do so.

Fred




reply via email to

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