modules/graphics/src/main/native-glass/win/BaseWnd.cpp

Print this page

        

@@ -37,11 +37,12 @@
 BaseWnd::BaseWnd(HWND ancestor) :
     m_hWnd(NULL),
     m_ancestor(ancestor),
     m_wndClassAtom(0),
     m_isCommonDialogOwner(false),
-    m_hCursor(NULL)
+    m_hCursor(NULL),
+    m_updatesCursor(true)
 {
 
 }
 
 BaseWnd::~BaseWnd()

@@ -175,11 +176,13 @@
     static const MessageResult NOT_PROCESSED;
 
     switch (msg) {
         case WM_SETCURSOR:
             if (LOWORD(lParam) == HTCLIENT) {
+                if (m_updatesCursor) {
                 ::SetCursor(m_hCursor);
+                }
                 return TRUE;
             }
             break;
     }
 

@@ -195,5 +198,10 @@
     // invoking this method only when it processes mouse_move or alike events.
     // As long as there's no bugs filed, let it be.
     ::SetCursor(m_hCursor);
 }
 
+void BaseWnd::SetUpdatesCursor(bool updatesCursor)
+{
+    m_updatesCursor = updatesCursor;
+}
+