Carlos Garnacho
1fa6239509
appchoooserdialog: use search bar key capture API
2018-04-05 19:26:54 +02:00
Carlos Garnacho
0b3b81a8bf
inspector: Use search bar API to capture key events from the toplevel
2018-04-05 19:26:54 +02:00
Carlos Garnacho
20c1e24b60
gtksearchbar/entry: Add [gs]et_key_capture_widget() API calls
...
This lets these widgets actively pull events from a widget, instead
of passively being fed events.
2018-04-05 19:26:54 +02:00
Carlos Garnacho
ad5f0a63a3
gtkwindow: Perform key activation in gtk_main_do_event()
...
In a similar spirit to the previous commit, make window shortcut
activation happen by default on toplevels, without relying on
legacy controllers.
2018-04-05 19:26:54 +02:00
Carlos Garnacho
6892b5c5ba
gtkwidget: Activate key bindings through run_controllers()
...
Deferring a bit further making those a standalone controller, make
binding activation happen on run_controllers(), so it happens by
default on widgets (unless the key event was consumed earlier)
without the need of a legacy event controller.
2018-04-05 19:26:54 +02:00
Carlos Garnacho
d74ecfb02e
gtkwidget: Break early if non-gesture controllers handle the event
...
Non gesture controllers have no means to collaborate with other
controllers, thus should be considered standalone entities. It makes
no sense to propagate any further if scroll/key controllers handled
the event.
2018-04-05 19:26:54 +02:00
Carlos Garnacho
695549d5a7
eventcontrollerkey: Add function to forward stuff elsewhere
2018-04-05 19:26:54 +02:00
Carlos Garnacho
b55696e551
gtkmain: Don't use special paths for key event propagation
...
Set the event_widget to the window focus, and let event capture/bubble
handling do the rest.
2018-04-05 19:26:54 +02:00
Carlos Garnacho
385fa18c27
gtkrange: Stop using ::key-press-event
...
Use GtkEventControllerKey for the task
2018-04-05 19:26:54 +02:00
Carlos Garnacho
cfdf4f650f
gtkcellrendereraccel: simplify grabbing code
2018-04-05 19:26:54 +02:00
Matthias Clasen
df386f29ab
combo box: Stop using ::key-press-event
...
Switch to using ::event.
2018-04-05 19:26:54 +02:00
Matthias Clasen
ec84fb90bf
app chooser: Stop using ::key-press-event
...
For now, just switch to using ::event.
2018-04-05 19:26:54 +02:00
Carlos Garnacho
80c3ebe3a0
gtkentrycompletion: Stop using ::key-press-event
...
Use GtkEventControllerKey for the task
2018-04-05 19:26:54 +02:00
Carlos Garnacho
585aafc2df
gtkplacessidebar: Stop using ::key-press-event
...
Use GtkEventControllerKey for the task
2018-04-05 19:26:54 +02:00
Carlos Garnacho
87b4dc4c67
gtktextview: Stop using ::key-press-event
...
Use GtkEventControllerKey for the task
2018-04-05 19:26:54 +02:00
Carlos Garnacho
5118f9817a
gtkflowbox: Stop using ::key-press-event
...
Use GtkEventControllerKey for the task
2018-04-05 19:26:54 +02:00
Carlos Garnacho
568054a034
gtkentry: Stop using ::key-press-event
...
Use GtkEventControllerKey for the task
2018-04-05 19:26:53 +02:00
Carlos Garnacho
0d884d22fb
gtkcolorswatch: Stop using ::key-press-event
...
Use GtkEventControllerKey for the task
2018-04-05 19:26:53 +02:00
Carlos Garnacho
6f4107c8de
gtkcolorplane: Stop using ::key-press-event
...
Use GtkEventControllerKey for the task
2018-04-05 19:26:53 +02:00
Carlos Garnacho
5081472d97
gtkcalendar: Stop using ::key-press-event
...
Use GtkEventControllerKey for the task
2018-04-05 19:26:53 +02:00
Matthias Clasen
b033e30318
search bar: Stop using ::key-press-event
...
Use a key event controller instead.
2018-04-05 19:26:53 +02:00
Matthias Clasen
f231ac6541
Shortcuts window: stop using ::key-press-event
...
Use a key event controller instead.
2018-04-05 19:26:53 +02:00
Matthias Clasen
c971ca7c34
color editor: Stop using ::key-press-event
...
Use key event controllers instead.
2018-04-05 19:26:53 +02:00
Matthias Clasen
4990842981
about dialog: Stop using ::key-press-event
...
Use a key event controller instead.
2018-04-05 19:26:53 +02:00
Matthias Clasen
21d1ab42d1
icon-browser: Stop using ::key-press-event
2018-04-05 19:26:53 +02:00
Matthias Clasen
6d1b21a028
places view: Stop using ::key-press-event
2018-04-05 19:26:53 +02:00
Matthias Clasen
c2bd7fcf35
inspector: Stop using ::key-press-event
2018-04-05 19:26:53 +02:00
Matthias Clasen
75024fea60
testgtk: Drop snapshot
...
This needs to be redone with modern snapshotting infrastructure.
Lets drop it for now, it is somewhat duplicative with inspector
features.
2018-04-05 19:26:53 +02:00
Matthias Clasen
98f31e61d7
testgtk: Drop the event watcher
...
This is not a very useful test, and it is hard to keep working
in an event controller world.
2018-04-05 19:26:53 +02:00
Matthias Clasen
2cc85df62b
docs: Modernize an example
...
The signals that are showcased here are going away.
2018-04-05 19:26:53 +02:00
Matthias Clasen
918d552472
gtk-demo: Stop using ::key-press-event in font explorer
...
Use a key controller instead. Note that this currently
breaks the handling of Enter, since we activate key bindings
twice, causing us to switch to the label and back.
2018-04-05 19:26:53 +02:00
Matthias Clasen
8d396991db
testsuite: Don't use ::key-press-event
...
We don't need it here.
2018-04-05 19:26:53 +02:00
Matthias Clasen
19bd57ed1f
file chooser: Use a key event controller
...
We want to get rid of ::key-press-event.
2018-04-05 19:26:53 +02:00
Carlos Garnacho
b1eaeebe7d
demos: Add "Paint" demo
2018-04-05 19:26:53 +02:00
Carlos Garnacho
f0c8e9de4f
gtk: Add GtkGestureStylus
...
This is a GtkGesture done to deal with stylus events from drawing tablets.
Those have a special number of characteristics that extend a regular
pointer, so it makes sense to wrap that.
2018-04-05 19:26:53 +02:00
Carlos Garnacho
58eaf5ca16
gtkwindow: Unset focus grab_widget if it ends up unmapped
...
This may result on the later emission of crossing events, with one of the
sides being already unmapped/unrealized. The widget being unmapped will
result on repick and emission of a set of crossing events anyway.
2018-04-05 19:26:04 +02:00
Carlos Garnacho
1ce79b29e3
gtk: Add GtkEventControllerKey
...
This event controller is meant to replace usage from key-press/release-event
handlers all through. Optionally it can be set a GtkIMContext, so interaction
is carried by the controller.
2018-04-05 19:26:04 +02:00
Benjamin Otte
47ea3a9452
snapshot: Don't cause invalid reads
...
1. Pass clip rectangles to gtk_snapshot_push_state() that point into
the state array.
2. g_array_set_size(len+1) the state array
3. Make that function realloc() the state array.
4. The clip rectangle now points into invalid memory
5. Use the clip array
This patch fixes things by moving step 5 to before step 2.
2018-04-05 18:41:34 +02:00
Benjamin Otte
1792f3b21e
rendernode: Add missing return
...
Don't to extra work when not needed.
2018-04-05 18:40:54 +02:00
Piotr Drąg
df74f36328
Update POTFILES.in
2018-04-05 17:37:22 +02:00
Benjamin Otte
ebea84474d
widget: Fix variable names
...
Stop docs build from complaining
2018-04-05 17:09:52 +02:00
Benjamin Otte
374467c11c
a11y: Fix headers
...
We were getting a gcc warning before.
2018-04-05 17:05:21 +02:00
Benjamin Otte
8cb0df7554
Merge branch 'window-activate' into 'master'
...
a11y: restore window:activate/deactivate emission
Closes #127
See merge request GNOME/gtk!77
2018-04-05 14:36:13 +00:00
Samuel Thibault
62f31015fc
a11y: restore window:activate/deactivate emission
...
1b9aa1b708
('a11y: drop the focus tracker') removed a bit too much. We
still have to emit window:activate/deactivate events. They are easy to
emit anyway.
Fixes #127
2018-04-05 15:19:04 +02:00
Benjamin Otte
a5cb6aa365
inspector: Add an fps overlay
2018-04-05 14:58:43 +02:00
Benjamin Otte
6de4c63a67
inspector: Bring back debug updates
...
This time, they are implemented as an overlay, so they require a running
inspector and can't be enabled via env variable anymore.
2018-04-05 14:58:42 +02:00
Benjamin Otte
2699c15a99
widget: Remove draw signal
...
The only remaining user is the text handle, but the text handle doesn't
draw anything anyway currently, so whoever fixes it can make it use
snapshots.
2018-04-05 14:57:10 +02:00
Benjamin Otte
de990614d7
inspector: Introduce so-called "overlays"
...
Overlays are drawings that get rendered on top of the inspected window.
The only overlay in existence so far is the highlight overlay, which is
used to highlight widgets and replaces the "draw" signal handler used
previously.
2018-04-05 14:57:10 +02:00
Benjamin Otte
cbf26fbd02
widget: Add gtk_widget_compute_bounds()
...
The first in a set of functions intended to query widget coordinates
from another widget's coordinate system.
2018-04-05 14:57:10 +02:00
Benjamin Otte
6c55096933
inspector: Change semantics of inspector render node notify
...
Instead of just notifying the inspector of what is going to be rendered,
allow the inspector to modify it.
This way, the inspector can overlay information it deems relevant over
the render node while still having access to what the actual widget
(without the inspector) would paint.
2018-04-05 14:57:10 +02:00