Skip to content

Instantly share code, notes, and snippets.

@loentar
Created January 11, 2015 18:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loentar/464d0ca08ce9c3deb866 to your computer and use it in GitHub Desktop.
Save loentar/464d0ca08ce9c3deb866 to your computer and use it in GitHub Desktop.
diff --git a/brushlib b/brushlib
index f6af776..0a6ad9d 160000
--- a/brushlib
+++ b/brushlib
@@ -1 +1 @@
-Subproject commit f6af7763a77530e8f50b3b4f9f4019c4f68fb820
+Subproject commit 0a6ad9de9debb9786bcc23cef19446410ac042a5
diff --git a/gui/stategroup.py b/gui/stategroup.py
index 63cfdbd..7cfa292 100644
--- a/gui/stategroup.py
+++ b/gui/stategroup.py
@@ -14,6 +14,8 @@ import gobject
import gtk
from gtk import gdk
+GDK_2BUTTON_PRESS = getattr(gdk.EventType, "2BUTTON_PRESS")
+GDK_3BUTTON_PRESS = getattr(gdk.EventType, "3BUTTON_PRESS")
class StateGroup (object):
"""Supervisor instance for GUI states.
@@ -146,6 +148,8 @@ class State (object):
if action_or_event:
if not isinstance(action_or_event, gtk.Action):
e = action_or_event
+ if e.type == GDK_2BUTTON_PRESS or e.type == GDK_3BUTTON_PRESS:
+ e.type = gdk.BUTTON_PRESS
# currently, we only support mouse buttons being pressed here
assert e.type == gdk.BUTTON_PRESS
# let's just note down what mous button that was
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment