Skip to content
Permalink
Browse files
Restore GNOME cursor-theme on exit
Sugar cursor affects the GNOME desktop environment.

Caused where the GNOME desktop cursor theme is changed to the Sugar theme.

* read cursor-theme before changing it in _start_window_manager,
* keep the Gio.Settings instance instead of deleting,
* restore the old value in the _stop_window_manager function.

Co-authored-by: James Cameron <quozl@laptop.org>
  • Loading branch information
srevinsaju and quozl committed Jan 10, 2020
1 parent 8084cdf commit 32bc784
Showing 1 changed file with 6 additions and 2 deletions.
@@ -196,8 +196,11 @@ def _restart_window_manager():


def _start_window_manager():
settings = Gio.Settings.new('org.gnome.desktop.interface')
settings.set_string('cursor-theme', 'sugar')
global _cursor_theme_settings, _cursor_theme

_cursor_theme_settings = Gio.Settings.new('org.gnome.desktop.interface')
_cursor_theme = _cursor_theme_settings.get_string('cursor-theme')
_cursor_theme_settings.set_string('cursor-theme', 'sugar')

_restart_window_manager()

@@ -208,6 +211,7 @@ def _start_window_manager():


def _stop_window_manager():
_cursor_theme_settings.set_string('cursor-theme', _cursor_theme)
_metacity_process.terminate()


0 comments on commit 32bc784

Please sign in to comment.