Hold gestures are used to bring existing gestures on touchpad
semantically closer to touchscreen gestures.
Touchpad gestures observe hold gestures with a matching amount of
fingers and emit their begin and end signals when fingers are detected
or removed on/from the touchpad.
When a hold cancel event is detected, it is required to wait a few
milliseconds until the next event(s) are received to avoid emitting
multiple begin signals.
Part-of: <!3454>
Handle hold events:
- GDK_TOUCHPAD_GESTURE_PHASE_BEGIN: scroll-begin is emitted.
- GDK_TOUCHPAD_GESTURE_PHASE_END: A hold gesture ends only when all
fingers are lifted from the touchpad without movement, so
scroll-end is emitted right away.
- GDK_TOUCHPAD_GESTURE_PHASE_CANCEL: A hold gesture is cancelled when
some fingers are lifted/put down or movement is detected. In this
case, scroll-end is emitted after a small timeout only if
GDK_SCROLL wasn't detected.
Part-of: <!3454>
Since the addition of GdkEventSequence in touchpad events, these
are now stored in the gesture using that sequence. This bit of touchpad
gesture handling was however missing to be updated, still looking up
the special NULL sequence.
Use the last sequence here, which will be the one coming from touchpad
gesture events.
Despite touchpad gestures having a sequence, these must use the logical
pointer focus. Avoid using the sequence for GtkPointerFocus lookups with
those events, in order to ensure those events make it all the way to the
intended target.
This is fallout from adding GdkEventSequence information to touchpad
gestures.
Remember the current context on focus-in even though the text-input
isn't set up yet. This helps in the case where the text-input is not yet
created but a widget already got focused. Without that the enable()
invocation in text_input_enter() woulnd't be invoked leaving the input
method disabled.
This fixes
gtk4-demo --run=search_entry
which would initially not show the on-screen keyboard when e.g using
phoc/sway as compositor.
Make GtkIMContextIME ignore ASCII control characters just like other
IMContext implementations (e.G. GtkIMContextSimple). Fixes bogus
characters appearing in text input fields (old bug 676077).
Unref private spool_io of GtkPrintJob before setting it to a new one
in gtk_print_job_set_source_file() and gtk_print_job_set_source_fd()
to prevent a leak.
Fixes: #4627
Instead of relying on the iso-codes package, use the native Windows NLS APIs to
acquire the localized (translated) language names so that we do not need to
incur an extra runtime dependency on Windows. It's not coverering 100% of the
languages that we would like to support through this, but should cover much of
the things that are required.
We aren't really using PangoFT2 for [language|script]-names.c, and are
always using items from them, so make sure they are being built.
Also always include the pangoft2 dependency in gtk_dep if it is found.
We were handling events in the wrong order,
by doing async calls for some of them, but not
for all of them.
And we were not taking into account that GFileMonitors
RENAMED events may or may not move a file on top
of an existing file.
Fixes: #3784
clang-tidy says:
gtklabel.c:1188:15: warning: Although the value stored to 'mid' is used in the enclosing expression, the value is never actually read from 'mid'
min = mid = text_width;
^ ~~~~~~~~~~
Which seems right since mid will be assigned to at the beginning of the
next loop iteration anyway.
If we have a GDK_ACTION_MOVE, we need to delete the selection. However,
previously this only worked when the drop target and drag source were
different applications, as the selection would get messed up along the
way.
Instead, we stash marks for the duration of the operation so that we can
delete the appropriate selection when completing the move.