From 013f9c209054f376e12358cb78d9f43028b4809b Mon Sep 17 00:00:00 2001 From: trigg Date: Thu, 28 Aug 2025 21:56:15 +0100 Subject: [PATCH] - Fix hide-on-mouseover for XShape WMs - Fix hide-on-mouseover in wayfire - Remove edge cases for Cinnamon as they are no longer required --- discover_overlay/overlay.py | 12 +++--------- discover_overlay/settings_window.py | 5 ----- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/discover_overlay/overlay.py b/discover_overlay/overlay.py index 1c15a08..58e2ac5 100644 --- a/discover_overlay/overlay.py +++ b/discover_overlay/overlay.py @@ -192,10 +192,6 @@ class OverlayWindow(Gtk.Window): if self.hide_on_mouseover: # We've mouse-overed if self.draw_blank: - self.set_untouchable() - context.set_source_rgba(0.0, 0.0, 0.0, 0.0) - context.set_operator(cairo.OPERATOR_SOURCE) - context.paint() return else: (width, height) = self.get_size() @@ -236,10 +232,6 @@ class OverlayWindow(Gtk.Window): if (self.floating != floating or self.pos_x != pos_x or self.pos_y != pos_y or self.width != width or self.height != height): - # Special case for Cinnamon desktop : see https://github.com/trigg/Discover/issues/322 - if ('XDG_SESSION_DESKTOP' in os.environ and - os.environ['XDG_SESSION_DESKTOP'] == 'cinnamon'): - floating = True self.floating = floating self.pos_x = pos_x @@ -487,15 +479,17 @@ class OverlayWindow(Gtk.Window): """Callback when mouseover occurs, hides overlay""" self.draw_blank = True self.set_needs_redraw() + self.hide() + GLib.timeout_add_seconds(self.timeout_mouse_over, self.mouseout_timed) return True def mouseout(self, _a=None, _b=None): """Callback when mouseout occurs, sets a timer to show overlay""" - GLib.timeout_add_seconds(self.timeout_mouse_over, self.mouseout_timed) return True def mouseout_timed(self, _a=None, _b=None): """Callback a short while after mouseout occured, shows overlay""" self.draw_blank = False + self.show() self.set_needs_redraw() return False diff --git a/discover_overlay/settings_window.py b/discover_overlay/settings_window.py index 0688685..2c4ac8d 100644 --- a/discover_overlay/settings_window.py +++ b/discover_overlay/settings_window.py @@ -732,9 +732,6 @@ class MainSettingsWindow(): self.widget['core_settings_min'].set_sensitive(self.show_sys_tray_icon) - if 'XDG_SESSION_DESKTOP' in os.environ and os.environ['XDG_SESSION_DESKTOP'] == 'cinnamon': - self.widget['voice_anchor_float'].set_sensitive(False) - self.widget['core_audio_assist'].set_active( config.getboolean("general", "audio_assist", fallback=False)) @@ -1000,8 +997,6 @@ class MainSettingsWindow(): def update_floating_anchor(self): floating = self.widget['voice_anchor_float'].get_active() == 0 - if 'XDG_SESSION_DESKTOP' in os.environ and os.environ['XDG_SESSION_DESKTOP'] == 'cinnamon': - floating = True if floating: self.widget['voice_align_1'].hide()