[Gambas-bugtracker] Bug #2324: Fedora issue, clicking activated window triggers DeActivated event

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Sat Jul 31 01:27:54 CEST 2021


http://gambaswiki.org/bugtracker/edit?object=BUG.2324&from=L21haW4-

Comment #3 by Benoît MINISINI:

I don't know. But your code is a bit of a mess:

1) It's a bad idea to ask the manager to move a window during its Show event. The result is unpredictable. You must define the window position before calling the Show() method. Then the position will be communicated to the window manager that will do what it wants with it. At least with X11. With Wayland, I think you can't decide at all where a window appears on the screen, unless it's a popup menu.

2) Using a trayicon as a button for opening a custom popup is another bad idea. Trayicon are now supposed to belong to the system tray. You should just declare them, their popup menu (whose structure is sent to the system tray through DBus), and handle the Click event. That's almost all you are supposed to do.




More information about the Bugtracker mailing list