From 234758707769457ce6edfc7dfeaedd4a7b0d8961 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 24 Jan 2018 19:11:48 +0100 Subject: [PATCH] x11: respect cursor updates when in confined/relative mouse mode --- panda/src/x11display/x11GraphicsWindow.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/panda/src/x11display/x11GraphicsWindow.cxx b/panda/src/x11display/x11GraphicsWindow.cxx index 8efbf01b5d..c57a580aa7 100644 --- a/panda/src/x11display/x11GraphicsWindow.cxx +++ b/panda/src/x11display/x11GraphicsWindow.cxx @@ -683,6 +683,12 @@ set_properties_now(WindowProperties &properties) { } else { 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()) {