Re: [Gtk-osx-users] StatusIcon, popup menu does not get focus



On 05/03/2011 12:36 AM, John Ralls wrote:
> 
> On May 2, 2011, at 3:11 AM, Antoine Martin wrote:
> 
>> Hi,
>>
>> My app uses a popdown menu from a StatusIcon, it does not necessarily
>> have any windows of its own shown on screen.
>>
>> The problem is that the popdown menu shown ('popup-menu' signal on the
>> StatusIcon) will react to mouse clicks correctly if the app was already
>> focused, but not if another app was in the foreground and the user
>> clicks on the StatusIcon ('activate' signal). It then takes a long click
>> to get the menu to register it (as the app has to gain focus).
>>
>> Is there a way I can force my application to gain focus when the
>> StatusIcon is clicked on? Or another workaround?
>>
>> Simple example application attached (add a 'tray.png' icon of your
>> choosing). Run it, then try to interact with the menu hanging of it.
> 
> Interesting.
> 
> I instrumented your sample with a few more print statements, and it looks like on OSX the "activate" signal is either not getting sent or not getting received.
IIRC, the 'activate' signal fires but only when the application is
already in focus and you click on the StatusIcon again.

> Please (after checking that there isn't one already) file a bug.
Sorry, probably a silly question, but where?
This bug (the only open gtk-osx one?) is also related to focus:
http://sourceforge.net/tracker/?func=detail&aid=660693&group_id=70160&atid=526807

FYI: I did try all sorts of ways to focus the widget, or rather the gdk
window that backs it, to no avail.

Thanks
Antoine



> 
> Regards,
> John Ralls
> 
> 
> ------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network 
> management toolset available today.  Delivers lowest initial 
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> _______________________________________________
> Gtk-osx-users mailing list
> Gtk-osx-users lists sourceforge net
> https://lists.sourceforge.net/lists/listinfo/gtk-osx-users





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