Skip to content

Set associated window for tray icon after showing main window

Nicolas Fella requested to merge work/nico/sni-window into master

Currently we set the associated window by passing GUI as parent window to the KStatusNotifierItem constructor. This will obtain the windowHandle for it and save that.

Later when creating the WebView for the search plugin Qt deletes and recreates the windowHandle for the main window, invalidating the windowHandle KStatusNotifierItem has saved.

This causes showing/hiding via the tray icon to not work.

To avoid this manually set the associated window later when the handle won't change any more

BUG: 483899

Merge request reports