Commit 3c22ab75 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Bring control to front when notification is clicked

if autopopup_chat_opened is activated no control is found because
the event that triggered the notification is already deleted when
the notification is clicked by the user. So instead of searching
for the event, search for the control with jid/account.

Fixes #9124
parent 9e096e87
......@@ -1664,7 +1664,15 @@ def handle_event(self, account, fjid, type_):
if not event:
event =, jid, type_)
if not event:
# If autopopup_chat_opened = True, then we send out
# notifications even if a control is open. This means the
# event is already deleted (because its printed to the
# control) when the notification is clicked. So try to
# get a control from account/jid
ctrl = self.msg_win_mgr.get_control(fjid, account)
if ctrl is None:
w = ctrl.parent_win
if type_ == 'printed_chat':
ctrl = event.control
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment