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: Gregory Casamento
Subject: Re: Some problems with popup menus when these should process events
Date: Sun, 4 Nov 2012 14:57:50 -0500

Guys,

If I recall correctly this was done to allow native menus to be used
in the Windows theme for the popup menus.   Without this method, it
would have been impossible to prevent the GNUstep drawn menus from
appearing.

If someone can devise a more elegant solution which doesn't require
this method, it would be gratefully accepted.

Thanks, GC

On Sun, Nov 4, 2012 at 2:17 PM, Fred Kiefer <address@hidden> wrote:
> 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
>
>
>
> _______________________________________________
> Gnustep-dev mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/gnustep-dev



-- 
Gregory Casamento
Open Logic Corporation, Principal Consultant
yahoo/skype: greg_casamento, aol: gjcasa
(240)274-9630 (Cell)
http://www.gnustep.org
http://heronsperch.blogspot.com



reply via email to

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