Commit Graph

12 Commits

Author SHA1 Message Date
Carlos Garnacho
6d8842ca96 gesturesingle: Implement GtkGesture::cancel better than GtkEventController:reset
The former can be called individually on each sequence, and the latter will
always call the former on all currently active sequences, so only implementing
resetting on cancel() works for both cases. Also, chain up on subclasses
implementing cancel.

This fixes clicking on nautilus' file list after popping up a menu, as broken
grabs are one of those situations where sequences get cancelled individually,
the "current button" wasn't properly reset, and further clicks with button != 3
were ignored.
2014-06-13 01:27:31 +02:00
Carlos Garnacho
20a59985fe gesturesingle: Ensure the current button stays set until after the touch/button release
This makes gtk_gesture_get_current_button() work properly on GtkGesture::end, and signals
spawn from there on subclasses.
2014-06-11 17:36:03 +02:00
Matthias Clasen
f195322254 GtkGestureSingle: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:03 -04:00
Matthias Clasen
0442431943 Docs: Cosmetic fixes 2014-05-23 19:54:33 +02:00
Matthias Clasen
aead8a360b Docs: Minor changes 2014-05-23 19:54:32 +02:00
Carlos Garnacho
0b3f4d5555 gesturesingle: Add an "exclusive" boolean property
All "exclusive" gestures listen for either pointer events, or
"pointer emulating" touch events, so only a single sequence at
a time can make these run.
2014-05-23 19:54:31 +02:00
Carlos Garnacho
3d34f26a6a gesture: Handle GdkEventGrabBroken
That may happen separately from grab-notify, and also due to external
reasons, so ensure all sequences are cancelled if a grab is taken
in some GdkWindows that would obscure events on the controller.
2014-05-23 19:54:30 +02:00
Matthias Clasen
42df9eda2d Prevent subclassing of gestures
For now, at least. We do this by hiding the instance and
class structures in private headers.
2014-05-23 19:54:28 +02:00
Carlos Garnacho
63dd7a568e gesturesingle: doc fixes 2014-05-23 19:54:28 +02:00
Carlos Garnacho
862f9d876e gesturesingle: Add missing documentation 2014-05-23 19:54:27 +02:00
Carlos Garnacho
cdb5ba9426 gesturesingle: check the current sequence before resetting the pressed button 2014-05-23 19:54:26 +02:00
Carlos Garnacho
d4d0f13c3a Add GtkGestureSingle
This is a GtkGesture subclass, specific to single-touch (or
mouse operated) gestures.
2014-05-23 19:54:22 +02:00