From 83b9cda22885a69e6b2c8918a5439b83938bad1a Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Sun, 19 Feb 2017 13:46:40 -0600 Subject: [PATCH] set cursor on the root window. Fixes antergos/web-greeter#117 --- whither/toolkits/gtk/window.py | 6 ++++++ whither/toolkits/qt/window.py | 1 + 2 files changed, 7 insertions(+) diff --git a/whither/toolkits/gtk/window.py b/whither/toolkits/gtk/window.py index 5134645..b6dd578 100644 --- a/whither/toolkits/gtk/window.py +++ b/whither/toolkits/gtk/window.py @@ -85,6 +85,12 @@ def _initialize(self) -> None: if config.stays_on_top: self.widget.set_keep_above(True) + # Set the cursor for the root window to prevent ugly default X cursor from being shown. + root_window = Gdk.get_default_root_window() + default_display = Gdk.Display.get_default_display() + cursor = Gdk.Cursor.new_for_display(default_display, Gdk.CursorType.LEFT_PTR) + root_window.set_cursor(cursor) + self.set_state(self.states[initial_state]) def _init_menu_bar(self) -> None: diff --git a/whither/toolkits/qt/window.py b/whither/toolkits/qt/window.py index 4f78b40..31d19dd 100644 --- a/whither/toolkits/qt/window.py +++ b/whither/toolkits/qt/window.py @@ -108,6 +108,7 @@ def _initialize(self) -> None: self.widget.windowFlags() | Qt.MaximizeUsingFullscreenGeometryHint ) + self.widget.setCursor(Qt.ArrowCursor) self.set_state(self.states[initial_state]) def _init_menu_bar(self) -> None: