]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed problem with CaptureMouse if cursor is null.
authorJulian Smart <julian@anthemion.co.uk>
Mon, 20 Mar 2000 10:53:04 +0000 (10:53 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 20 Mar 2000 10:53:04 +0000 (10:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp
src/gtk1/window.cpp

index 11ac0f1d55c8c43cbbff779407839c4fa1050283..80384e2535660c2486459e7522ccbb82cec4c055 100644 (file)
@@ -3422,6 +3422,10 @@ void wxWindow::CaptureMouse()
 
     if (!window) return;
 
+    wxCursor* cursor = & m_cursor;
+    if (!cursor->Ok())
+        cursor = wxSTANDARD_CURSOR;
+
     gdk_pointer_grab( window, FALSE,
                       (GdkEventMask)
                          (GDK_BUTTON_PRESS_MASK |
@@ -3429,7 +3433,7 @@ void wxWindow::CaptureMouse()
                           GDK_POINTER_MOTION_HINT_MASK |
                           GDK_POINTER_MOTION_MASK),
                       (GdkWindow *) NULL,
-                      m_cursor.GetCursor(),
+                      cursor->GetCursor(),
                       (guint32)GDK_CURRENT_TIME );
     g_captureWindow = this;
 }
index 11ac0f1d55c8c43cbbff779407839c4fa1050283..80384e2535660c2486459e7522ccbb82cec4c055 100644 (file)
@@ -3422,6 +3422,10 @@ void wxWindow::CaptureMouse()
 
     if (!window) return;
 
+    wxCursor* cursor = & m_cursor;
+    if (!cursor->Ok())
+        cursor = wxSTANDARD_CURSOR;
+
     gdk_pointer_grab( window, FALSE,
                       (GdkEventMask)
                          (GDK_BUTTON_PRESS_MASK |
@@ -3429,7 +3433,7 @@ void wxWindow::CaptureMouse()
                           GDK_POINTER_MOTION_HINT_MASK |
                           GDK_POINTER_MOTION_MASK),
                       (GdkWindow *) NULL,
-                      m_cursor.GetCursor(),
+                      cursor->GetCursor(),
                       (guint32)GDK_CURRENT_TIME );
     g_captureWindow = this;
 }