Commit Graph

51801 Commits

Author SHA1 Message Date
Carlos Garnacho
403a724164 gdk: Remove array of event masks
This has been unused since all events are just forwarded instead of
checking client-side windows evmasks.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
1f91ca0cec gtklistbox: Remove enter/leave/motion event handlers
Those worked similarly to those in GtkFlowBox, but would additionally
handle "active" state for child rows. Simplify this to just enabling/
disabling active state on gesture press/release, we don't get the
nice state updates when hovering around with a mouse button pressed,
but the rationale from flowbox applies here, and makes a nice cleanup.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
7d196db4c0 gtkcolorswatch: Remove enter/leave event handlers
Those just maintained prelight state, which is already managed internally.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
9d5c04012e gtkbutton: Remove enter/leave event handlers
They just maintain priv->in_button and widget state up-to-date, this
basically matters during user interaction, and is already maintained
in the gesture ::update handler. This seems to be sufficient.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
c4d57f85f4 gtkflowbox: Drop crossing/motion event handlers
Those basically controlled priv->active_child_active, which would
1) trigger a redraw when the pointer enters/leaves it, and 2) ensure
that press/release happen on the same child for it to be activated.

The former is not necessary, and the latter can be simplified by
just checking again the child on the coordinates given by the
::release gesture handler. This makes all enter/leave/motion_notify
event handlers unneeded.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
27a391bad8 gtkspinbutton: Remove motion notify handler
It does nothing nowadays.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
b31029457b gtkcalendar: Use scroll event controller 2017-09-19 18:40:50 +02:00
Carlos Garnacho
cf6ecc9095 gtkscrolledwindow: Use scroll event controller
All kinetic scrolling initial velocity calculations are now
taken from the scroll controller. The handling of timeouts
to snap back when overshooting has been also made to just
apply on devices that can't emit ::scroll-begin/end.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
ad05caedd3 gtkspinbutton: Use scroll event controller 2017-09-19 18:40:50 +02:00
Carlos Garnacho
9a204921ae gtkscalebutton: Use scroll event controller 2017-09-19 18:40:50 +02:00
Carlos Garnacho
861916fd0b gtkrange: Use scroll event controller 2017-09-19 18:40:49 +02:00
Carlos Garnacho
f3474645c4 gtkpathbar: Use scroll event controller 2017-09-19 18:40:49 +02:00
Carlos Garnacho
d0e27ba760 gtkmenu: Use scroll event controller 2017-09-19 18:40:49 +02:00
Carlos Garnacho
215c4ed419 gtkcombobox: Use scroll event controller 2017-09-19 18:40:49 +02:00
Carlos Garnacho
c3fbd58916 gtk: Add GtkEventControllerScroll
This is a GtkEventController implementation to handle mouse
scrolling. It handles both smooth and discrete events and
offers a way for callers to tell their preference too, so
smooth events shall be accumulated and coalesced on request.

On capable devices, it can also emit ::scroll-begin and
::scroll-end enclosing all ::scroll events for a scroll
operation.

It also has builtin kinetic scrolling capabilities, reporting
the initial velocity for both axes after ::scroll-end if
requested.
2017-09-19 18:39:03 +02:00
Carlos Garnacho
2985bf3313 gdk/x11: Avoid delivering emulated scroll events
We now just propagate the real event, and let the caller deal
with smooth vs discrete.
2017-09-19 18:39:03 +02:00
Carlos Garnacho
d271b135bb gdk/wayland: Drop emission of emulated scroll events
A wl_pointer.frame can now only result on one scroll event
being emitted.
2017-09-19 18:39:03 +02:00
Carlos Garnacho
f2ded6a685 gtk: Change gtk_propagate_event() to propagate both ways.
This change is made for consistency, it doesn't make sense to expose
one-way propagation, as it can only break expectations from GTK+. This
function might be made entirely private in the future, but it still
makes sense to do this in one go for our internal usecases.
2017-09-19 18:39:03 +02:00
Carlos Garnacho
6fd905e4e1 gdk/x11: Drop motion/button events emulated from touch
We now always listen to touch events. Just avoid delivering both
types of events.
2017-09-19 18:39:03 +02:00
Carlos Garnacho
c02d0f3c0a eventcontroller: Drop event_mask API
This is unchecked, we can remove it entirely as well.
2017-09-19 18:39:03 +02:00
Carlos Garnacho
5b9287ed77 gtkwidget: Drop pointer emulation out of touch events
Users of touch events are required to either use a GtkGesture, or handle
touch events themselves.
2017-09-19 18:39:03 +02:00
Carlos Garnacho
8c350459ae gtk: Run GtkWidgetClass event signals inside a GtkEventController
This will allow further cleanups and optimizations in capture/target/bubble
event delivery. For simplicity, ATM every widget will receive its own
GtkEventControllerLegacy, it could be desirable to add finer control over
this in the future, so widgets that fully use event controllers for input
management can do away without this legacy piece.
2017-09-19 18:39:03 +02:00
Matthias Clasen
b350db58e0 testsuite: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
e1ea408161 tests: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
d5d0ee6f9d examples: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
880d44aa48 widget: Give up on GdkEvent api for now 2017-09-19 18:39:03 +02:00
Matthias Clasen
0ab20b6253 treeview: Give up on GdkEvent api for now
There's multiple places where events are manually generated
here, this needs more thought.
2017-09-19 18:39:03 +02:00
Matthias Clasen
d0c92fba69 entry accessible: Give up on GdkEvent api for now
Just include gdkeventsprivate.h here for now. This may be
resolved by just dropping icon support from GtkEntry down
the road.
2017-09-19 18:39:03 +02:00
Matthias Clasen
0554f6372b a11y: Stop listening for configure events
This needs to be done differently.
2017-09-19 18:39:03 +02:00
Matthias Clasen
7306f55912 Add some more GdkEvent getters 2017-09-19 18:39:03 +02:00
Matthias Clasen
25ab8f7c6b gtk-demo: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
208a85c3fe treev view column: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
56189fdb74 clipboard: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
efd287feb3 a11y: Use GdkEvent API in some places
More work needed.
2017-09-19 18:39:03 +02:00
Matthias Clasen
853602bf63 tooltip: Use GdkEvent API
And at the same time, reshuffle things slightly to avoid
creating synthetic events.
2017-09-19 18:39:03 +02:00
Matthias Clasen
96daf93821 text view: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
9c477951cb text handle: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
aeaa42121f selection: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
f43849901d search bar: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
c7225bc8c1 scrolled window: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
7793e8f071 places view: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
5d5ae459c4 place sidebar: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
3b266de66c path bar: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
75b16ac855 pad controller: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
ebc66eefa8 menu shell: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
d7ccf36d71 menu item: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
b99c3d33ec im context simple: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
67489349a5 header bar: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
50701abcc3 gesture zoom: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
5430751644 gesture swipe: Use GdkEvent API 2017-09-19 18:39:03 +02:00