Commit 96db483a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

Qt4: systray hides the interface when it is visible regardless of focus

Otherwise, if the interface is hidden behind another window, clicking
the tray icon however many times will request user attention in the task
bar and never actually show the interface. This was confusing and
inconvenient (fixes #2396). This new behavior is consistent with KMail.

It would probably be even better to show the interface on top (instead
of hiding it, then show it on the second click). Unfortunately, while it
does seem possible, I do not know how. For sure, the previous scheme did
not work anyway.
parent 67e84bad
......@@ -866,7 +866,7 @@ void MainInterface::toggleUpdateSystrayMenu()
/* Visible */
/* Visible (possibly under other windows) */
#ifdef WIN32
/* check if any visible window is above vlc in the z-order,
* but ignore the ones always on top
......@@ -881,9 +881,6 @@ void MainInterface::toggleUpdateSystrayMenu()
hwnd = GetNextWindow( hwnd, GW_HWNDPREV ) );
if( !hwnd || !GetWindowInfo( hwnd, &wi ) ||
(wi.dwExStyle&WS_EX_TOPMOST) )
if( isActiveWindow() )
......@@ -891,6 +888,9 @@ void MainInterface::toggleUpdateSystrayMenu()
QVLCMenu::updateSystrayMenu( this, p_intf );
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