[gnome-contacts] Only steal button 1 in clickable
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Only steal button 1 in clickable
- Date: Mon, 19 Dec 2011 14:12:06 +0000 (UTC)
commit 85db14203696523bcf357a709a2d99b27f3fe2b1
Author: Alexander Larsson <alexl redhat com>
Date: Mon Dec 19 15:01:26 2011 +0100
Only steal button 1 in clickable
src/contacts-clickable.vala | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/src/contacts-clickable.vala b/src/contacts-clickable.vala
index 209715a..ad9b65d 100644
--- a/src/contacts-clickable.vala
+++ b/src/contacts-clickable.vala
@@ -74,22 +74,25 @@ public class Contacts.Clickable : Object {
}
private bool button_press_event (Gdk.EventButton event) {
- if (event.type == Gdk.EventType.BUTTON_PRESS) {
+ if (event.button == 1) {
if (focus_on_click && !widget.has_focus)
widget.grab_focus ();
- if (event.button == 1)
- pressed ();
+ pressed ();
+
+ return true;
}
- return true;
+ return false;
}
private bool button_release_event (Gdk.EventButton event) {
- if (event.button == 1)
+ if (event.button == 1) {
released ();
+ return true;
+ }
- return true;
+ return false;
}
private bool grab_broken_event (Gdk.EventGrabBroken event) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]