I help with Windows support for the PyGTK application, which appears as an applet in the system panel, but I'm not so strong in GTK + gooey stuff ...
We have this, so when you left-click on the systray icon, the window appears directly on your tray icon, no matter where your system tray is located - and on Linux this works fine using the results of gtk.StatusIcon.get_geometry() to calculate the size and position.
Of course, the docs for gtk.StatusIcon.get_geometry () indicate that "some platforms do not provide this information" - and this includes MS Windows, as a result, I get NoneType.
I can make an assumption and place the window in the lower right corner of the screen, 30 pixels up, as this will catch most Windows users who have not moved the taskbar. But for those who have, everything looks wrong.
So, is there a way for Windows to get the position of the systray icon so that I can place my window there?
Please note: I am already using gtk_menu_popup() with gtk_status_icon_position_menu for a popup menu that works correctly.
But what I'm trying to position is a separate gtk.Window that will not accept gtk_status_icon_position_menu (because it is not a menu).
Any other ideas would be appreciated ...
source share