From d687bdbef281b38d9331c227852f02b93c92c1e4 Mon Sep 17 00:00:00 2001 From: piotr Date: Mon, 10 Apr 2023 23:04:08 +0200 Subject: [PATCH] use on-button-release event instead of buggy on-button-press #199 --- nwg_panel/modules/swaync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nwg_panel/modules/swaync.py b/nwg_panel/modules/swaync.py index fc8d9498..cbb6162b 100644 --- a/nwg_panel/modules/swaync.py +++ b/nwg_panel/modules/swaync.py @@ -55,7 +55,7 @@ def __init__(self, settings, icons_path, panel_position): if settings["on-left-click"] or settings["on-right-click"] or settings["on-middle-click"] or settings[ "on-scroll-up"] or settings["on-scroll-down"]: - self.connect('button-press-event', self.on_button_press) + self.connect('button-release-event', self.on_button_release) self.add_events(Gdk.EventMask.SCROLL_MASK) self.connect('scroll-event', self.on_scroll) @@ -120,7 +120,7 @@ def on_leave_notify_event(self, widget, event): widget.unset_state_flags(Gtk.StateFlags.DROP_ACTIVE) widget.unset_state_flags(Gtk.StateFlags.SELECTED) - def on_button_press(self, widget, event): + def on_button_release(self, widget, event): if event.button == 1 and self.settings["on-left-click"]: self.launch(self.settings["on-left-click"]) elif event.button == 2 and self.settings["on-middle-click"]: