avoid displaying context menu for application button _and_ desktop bar at the same...
authorMartin Fuchs <fuchs.martin@gmail.com>
Thu, 26 Feb 2004 20:38:32 +0000 (20:38 +0000)
committerMartin Fuchs <fuchs.martin@gmail.com>
Thu, 26 Feb 2004 20:38:32 +0000 (20:38 +0000)
svn path=/trunk/; revision=8411

reactos/subsys/system/explorer/doc/TODO.txt
reactos/subsys/system/explorer/taskbar/taskbar.cpp

index 4011180..09c6839 100644 (file)
@@ -31,7 +31,6 @@
   Yes, ROS epxlorer doesn't read many settings from the registry currently,
   as it doesn't have a way to configure them. (missing configuration dialogs)
 
-- Unterdrücken des Taskbar-Kontext-Menüs über Taskbar Buttons
 - Vollbildfenster suchen -> Taskleiste ausblenden
 - Fenster-Aktivierung nach Desktop-Umschaltung
 - Desktop-Manager: Speicherung der Verteilung von Applikations-Fenstern auf die verschiedenen Desktops; Desktop-Namen
index f711503..fedca72 100644 (file)
@@ -113,6 +113,13 @@ LRESULT TaskBar::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
          case WM_TIMER:
                Refresh();
                return 0;
+
+         case WM_CONTEXTMENU: {
+               Point pt(lparam);
+               ScreenToClient(_htoolbar, &pt);
+               if ((HWND)wparam==_htoolbar && SendMessage(_htoolbar, TB_HITTEST, 0, (LPARAM)&pt)>0)
+                       break;  // avoid displaying context menu for application button _and_ desktop bar at the same time
+               goto def;}
 /*
 //#define PM_SHELLHOOK_NOTIFY          (WM_APP+0x10)
 
@@ -130,7 +137,7 @@ LRESULT TaskBar::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
                Refresh();
                break;}
 */
-         default:
+         default: def:
                return super::WndProc(nmsg, wparam, lparam);
        }