From 9d2f5d64660ee77fcabc160e2341d886c88e03bd Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Sat, 3 Jul 2010 18:14:37 +0100 Subject: [PATCH] Clear the WM urgency hint on all mouse clicks. Partially closes LP #600280 --- terminatorlib/window.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/terminatorlib/window.py b/terminatorlib/window.py index a9f261de..6e69b06d 100755 --- a/terminatorlib/window.py +++ b/terminatorlib/window.py @@ -94,6 +94,7 @@ class Window(Container, gtk.Window): def register_callbacks(self): """Connect the GTK+ signals we care about""" self.connect('key-press-event', self.on_key_press) + self.connect('button-press-event', self.on_button_press) self.connect('delete_event', self.on_delete_event) self.connect('destroy', self.on_destroy_event) self.connect('window-state-event', self.on_window_state_changed) @@ -175,6 +176,12 @@ class Window(Container, gtk.Window): return(False) return(True) + def on_button_press(self, window, event): + """Handle a mouse button event. Mainly this is just a clean way to + cancel any urgency hints that are set.""" + self.set_urgency_hint(False) + return(False) + def is_child_notebook(self): """Returns True if this Window's child is a Notebook""" maker = Factory()