]> git.sesse.net Git - vlc/commitdiff
qt4: don't count unselectable windows
authorHannes Domani <ssbssa@yahoo.de>
Mon, 3 Nov 2008 17:47:35 +0000 (18:47 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 6 Dec 2008 01:12:49 +0000 (02:12 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/gui/qt4/main_interface.cpp

index 32e660ee6f953c5188aec0d68e5acaeb0a359571..71ed7cf77cf7b15a82d9c62119ad60c4510a7089 100644 (file)
@@ -927,12 +927,15 @@ void MainInterface::toggleUpdateSystrayMenu()
         /* Visible */
 #ifdef WIN32
         /* check if any visible window is above vlc in the z-order,
-         * but ignore the ones always on top */
+         * but ignore the ones always on top
+         * and the ones which can't be activated */
         WINDOWINFO wi;
         HWND hwnd;
         wi.cbSize = sizeof( WINDOWINFO );
         for( hwnd = GetNextWindow( internalWinId(), GW_HWNDPREV );
-                hwnd && !IsWindowVisible( hwnd );
+                hwnd && ( !IsWindowVisible( hwnd ) ||
+                    ( GetWindowInfo( hwnd, &wi ) &&
+                      (wi.dwExStyle&WS_EX_NOACTIVATE) ) );
                 hwnd = GetNextWindow( hwnd, GW_HWNDPREV ) );
         if( !hwnd || !GetWindowInfo( hwnd, &wi ) ||
                 (wi.dwExStyle&WS_EX_TOPMOST) )