Browse Source

x11: respect cursor updates when in confined/relative mouse mode

rdb 8 years ago
parent
commit
2347587077
1 changed files with 6 additions and 0 deletions
  1. 6 0
      panda/src/x11display/x11GraphicsWindow.cxx

+ 6 - 0
panda/src/x11display/x11GraphicsWindow.cxx

@@ -683,6 +683,12 @@ set_properties_now(WindowProperties &properties) {
     } else {
     } else {
       XDefineCursor(_display, _xwindow, None);
       XDefineCursor(_display, _xwindow, None);
     }
     }
+
+    // Regrab the mouse if we changed the cursor, otherwise it won't update.
+    if (!properties.has_mouse_mode() &&
+        _properties.get_mouse_mode() != WindowProperties::M_absolute) {
+      properties.set_mouse_mode(_properties.get_mouse_mode());
+    }
   }
   }
 
 
   if (properties.has_foreground()) {
   if (properties.has_foreground()) {