Click on notification doesn't refocus the chat window
Versions
- OS: Linux
- GTK+ Version: 3.22.30
- PyGObject Version: 3.28.2
- python-nbxmpp Version: 0.6.5
- Gajim Version: 1.0.2+6cdcbf11
Steps to reproduce the problem
- configure notifications for incoming messages
- move the chat window in the background
- send a message from a different account to receive a notification
- click on the notification
Expected behavior
The chat window that corresponds to the message form the notification comes to the front.
Actual behavior
The notification disappears and the window stays in the background.
Additional information
I did some debugging and found 2 issues which cause this bug:
- The first is that in line 2640 of the
connection_handlers_events.py
the value forpopup_msg_type
is set tochat
. During the debugging i figured out that this value should beprinted_chat
otherwise the code, that has to find the corresponding event which contains a reference to the chat window, doesn't work. - The second issue looks more like a bug in GTK or Gnome. Cause the API tells that the chat window is still visible although it's in the background. It seems that invoking the method
present
on a window that is already visible has no effect. If I call the methodhide
of the window just before the methodpresent
(gui_interface.py:1771
) the window comes to the front.