Author: dquintana
Date: Mon Apr  7 10:12:41 2014
New Revision: 62680

URL: http://svn.reactos.org/svn/reactos?rev=62680&view=rev
Log:
[RSHELL]
* Some small fixes to the previous commit. (Clicking still do not work in 
win2003, though)

Modified:
    branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp
    branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp
    branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp
    branches/shell-experiments/base/shell/rshell/precomp.h

Modified: branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp
URL: 
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp?rev=62680&r1=62679&r2=62680&view=diff
==============================================================================
--- branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp       
[iso-8859-1] (original)
+++ branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp       
[iso-8859-1] Mon Apr  7 10:12:41 2014
@@ -300,37 +300,32 @@
         rc.right += bm.bmWidth;
     }
 
-    int x, y, cx, cy;
-
     RECT rcWorkArea;
     GetWindowRect(GetDesktopWindow(), &rcWorkArea);
     int waHeight = rcWorkArea.bottom - rcWorkArea.top;
 
+    int x = ppt->x;
+    int y = ppt->y;
+    int cx = rc.right - rc.left;
+    int cy = rc.bottom - rc.top;
+
     switch (dwFlags & 0xFF000000)
     {
     case MPPF_BOTTOM:
         x = ppt->x;
-        cx = rc.right - rc.left;
         y = ppt->y - rc.bottom;
-        cy = rc.bottom - rc.top;
         break;
     case MPPF_RIGHT:
         x = ppt->x + rc.left;
-        cx = rc.right - rc.left;
         y = ppt->y + rc.top;
-        cy = rc.bottom - rc.top;
         break;
     case MPPF_TOP | MPPF_ALIGN_LEFT:
         x = ppt->x - rc.right;
-        cx = rc.right - rc.left;
         y = ppt->y + rc.top;
-        cy = rc.bottom - rc.top;
         break;
     case MPPF_TOP | MPPF_ALIGN_RIGHT:
         x = ppt->x;
-        cx = rc.right - rc.left;
         y = ppt->y + rc.top;
-        cy = rc.bottom - rc.top;
         break;
     }
 

Modified: branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp
URL: 
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp?rev=62680&r1=62679&r2=62680&view=diff
==============================================================================
--- branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp  
[iso-8859-1] (original)
+++ branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp  
[iso-8859-1] Mon Apr  7 10:12:41 2014
@@ -254,9 +254,14 @@
     POINT pt2 = { GET_X_LPARAM(msg->lParam), GET_Y_LPARAM(msg->lParam) };
     ClientToScreen(msg->hwnd, &pt2);
 
-    /* Don't do anything if the mouse has not been moved */
+    // Don't do anything if the mouse has not been moved
     POINT pt = msg->pt;
     if (pt.x == m_ptPrev.x && pt.y == m_ptPrev.y)
+        return TRUE;
+
+    // Don't do anything if another window is capturing the mouse.
+    HWND cCapture = ::GetCapture();
+    if (cCapture && cCapture != m_captureHwnd)
         return TRUE;
 
     m_ptPrev = pt;

Modified: branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp
URL: 
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp?rev=62680&r1=62679&r2=62680&view=diff
==============================================================================
--- branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp      
[iso-8859-1] (original)
+++ branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp      
[iso-8859-1] Mon Apr  7 10:12:41 2014
@@ -602,7 +602,7 @@
 
     if (m_hotBar == this && toolbar != this)
     {
-        SendMessage(m_hwndToolbar, TB_SETHOTITEM, -1, 0);
+        SendMessage(m_hwndToolbar, TB_SETHOTITEM, (WPARAM)-1, 0);
     }
 
     m_hotBar = toolbar;
@@ -967,7 +967,7 @@
     if (prev != -1)
     {
         DbgPrint("Setting Hot item to null\n");
-        SendMessage(m_hwndToolbar, TB_SETHOTITEM, -1, 0);
+        SendMessage(m_hwndToolbar, TB_SETHOTITEM, (WPARAM) -1, 0);
     }
     return S_FALSE;
 }

Modified: branches/shell-experiments/base/shell/rshell/precomp.h
URL: 
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rshell/precomp.h?rev=62680&r1=62679&r2=62680&view=diff
==============================================================================
--- branches/shell-experiments/base/shell/rshell/precomp.h      [iso-8859-1] 
(original)
+++ branches/shell-experiments/base/shell/rshell/precomp.h      [iso-8859-1] 
Mon Apr  7 10:12:41 2014
@@ -1,3 +1,21 @@
+
+#ifdef _MSC_VER
+
+// Disabling spammy warnings when compiling with /W4 or /Wall
+#pragma warning(disable:4100) // unreferenced formal parameter
+#pragma warning(disable:4201) // nonstandard extension used
+#pragma warning(disable:4265) // class has virtual functions, but destructor 
is not virtual
+#pragma warning(disable:4365) // signed/unsigned mismatch
+#pragma warning(disable:4514) // unreferenced inline function
+#pragma warning(disable:4710) // function was not inlined
+#pragma warning(disable:4820) // padding added
+#pragma warning(disable:4946) // reinterpret_cast between related classes
+
+// Disable some warnings in headers only
+#pragma warning(push)
+#pragma warning(disable:4244) // possible loss of data
+#pragma warning(disable:4512) // assignment operator could not be gernerated
+#endif
 
 #define USE_SYSTEM_MENUDESKBAR 0
 #define USE_SYSTEM_MENUSITE 0
@@ -37,10 +55,14 @@
 #include <atlcom.h>
 #include <wine/debug.h>
 
+#if _MSC_VER
+// Restore warnings
+#pragma warning(pop)
+#endif
+
 #define shell32_hInstance 0
 #define SMC_EXEC 4
 extern "C" INT WINAPI Shell_GetCachedImageIndex(LPCWSTR szPath, INT nIndex, 
UINT bSimulateDoc);
-
 
 extern "C" HRESULT WINAPI CStartMenu_Constructor(REFIID riid, void **ppv);
 extern "C" HRESULT WINAPI CMenuDeskBar_Constructor(REFIID riid, LPVOID *ppv);


Reply via email to