| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
GTK4 has had smooth scroll events since the beginning, so we
prefer not to emit emulated discrete scroll events at all
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since GdkTimeCoord stores only axis values, prior to this change,
if a device didn't report GDK_AXIS_X or GDK_AXIS_Y, the history
attached to merged motion events wouldn't contain any positional
information.
Commit 6012276093ea10dc0913c38d9123c37b08a20264 already addressed
this issue for devices without tools by storing the event position
in GdkTimeCoord using GDK_AXIS_X and GDK_AXIS_Y and augmenting the
GdkTimeCoord's axis bitmask accordingly.
This change generalizes that workaround to all devices. Note that
if a device DOES report values for GDK_AXIS_X and GDK_AXIS_Y, those
values won't be overwritten.
Closes #4809
|
|
|
|
|
|
|
| |
Add a new GdkScrollUnit enum that represent the
unit of scroll deltas provided by GdkScrollEvent.
The unit is accessible through
gdk_scroll_event_get_unit().
|
|
|
|
|
|
|
| |
Allow to create hold events as well as the required functions to get
information about the event: gesture phase, finger count, etc
Part-of: <!3454>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change is done for 2 reasons:
- The logic to request this phase when compressing scroll events is
slightly broken. If there are multiple scroll events that are
coalesced into one, the surface frame clock will not get this request.
The worst case is having >= 2 scroll events on every frame, as the
compressed event will be left in the queue, and be further compressed
on future events.
- Even scroll events aside, this phase is requested in oddly specific
places that are not enough to cover all events, others do rely on
unrelated GdkFrameClock activity that happens to flush the events
as well.
Unify this phase request so it explicitly happens on the arrival of any
event. This ensures that events (compressed or not) will be handled
promptly after arrival.
|
| |
|
|
|
|
| |
We are not going to compress those anyway.
|
|
|
|
|
|
|
| |
It makes sense to connect the begin/update/end events
for touchpad swipes and pinches in a sequence. This
commit adds the plumbing for it, but not backends
are setting sequences yet.
|
| |
|
|
|
|
|
| |
Collecting of history wasn't working correctly
for either motion or scroll events.
|
| |
|
| |
|
|
|
|
| |
Replace leftover gtk-doc syntax (#Type) with backquotes.
|
|
|
|
|
|
|
|
| |
Remove a boatload of "or %NULL" from nullable parameters
and return values. gi-docgen generates suitable text from
the annotation that we don't need to duplicate.
This adds a few missing nullable annotations too.
|
|
|
|
|
|
| |
Give each device a timestamp that reflects the last
user activity with that device, as reflected in the
events that are produced for this device.
|
|
|
|
|
|
|
|
|
| |
GTK traditionally lets you activate keyboard shortcuts
even if they are for a non-active layout. But it is meant
to only activate with a keysym from a non-active layout
when that symbol is not present in the current layout.
That last condition was lost when key event handling
was redone for GTK4. Bring it back.
|
|
|
|
| |
Convert links, make things more concise.
|
|
|
|
| |
This is not really worth a chapter of its own.
|
| |
|
|
|
|
|
| |
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
|
|\
| |
| |
| |
| | |
types: fix various use of volatile in type registration
See merge request GNOME/gtk!2865
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The use of volatile was incorrect in GLib and has been that way for
a long time. Recently however that has changed, and this makes GTK
follow suit to avoid using volatile in the type registration.
See also: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719
Combined with the above merge request for GLib, this fixes a large
number of compilation warnings when using Clang.
|
| |
| |
| |
| |
| | |
The way this code is written trips up scan-build. Add
gdk_event_dup_axes() and use it in gtkmain.c.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
100% symbol docs coverage.
833 symbols documented.
0 symbols incomplete.
0 not documented.
What's left are just type system macros and windowing system opaque
structures.
|
|/
|
|
|
|
| |
This removes the GDK_CONFIGURE event and all related functions and data
types; it includes untested changes to the MacOSX, Win32 and Broadway
backends.
|
|
|
|
|
|
|
| |
The current code was marking queued events as flushed,
but left them in the queue. That doesn't make sense to
me - we should deliver all events we have before we
reach the paint phase of the frame cycle.
|
|
|
|
|
|
| |
No users of gdk_display_peek_event, gdk_display_has_pending
_gdk_display_event_data_copy or _gdk_display_event_data_free,
so drop all of these, and related vfuncs.
|
|
|
|
| |
Move things to the private headers they belong in.
|
|
|
|
|
| |
We were leaking the last event in a sequence
of scroll events.
|
|
|
|
| |
Clean up references to no-longer-existing APIs.
|
|
|
|
|
|
|
|
|
|
| |
Make GdkEvents hold a single GdkDevice. This device is closer to
the logical device conceptually, although it must be sufficient for
device checks (i.e. GdkInputSource), which makes it similar to the
physical devices.
Make the logical devices have a more accurate GdkInputSource where
needed, and conflate the event devices altogether.
|
|
|
|
|
| |
Instead of doing device-specific translations of array positions,
use GdkAxisUse as an array index right away.
|
| |
|
| |
|
| |
|
|
|
|
| |
Make sure gdk_event_get_seat shows up.
|
|
|
|
|
| |
It currently fetches the seat from the event device, will be changed
in future commits.
|
|
|
|
|
|
| |
We already use the "logical/virtual" and "physical" names in the
documentation, there's no reason to use loaded terms just because X11
uses them.
|
|
|
|
|
| |
We were casting scroll events to motion events
rather carelessly. Don't do that.
|
|
|
|
| |
Add some useful information about event history.
|
|
|
|
|
|
|
|
|
|
|
| |
Scroll events can have history too, so make a
getter that works for both. This drops the
gdk_scroll_event_get_history getter that was
added a few commits earlier, since we now
store scroll history in the same way as
motion history.
Update the docs, and all callers.
|
|
|
|
|
|
| |
Similar to how we keep motion history for compressed
events, keep scroll history for compressed scroll
events.
|
|
|
|
|
|
|
|
|
|
| |
Only return one accumulated scroll event per frame.
Compress them by adding up the deltas.
Still missing: a way to capture history, like
we do for motion events.
Fixes: #2800
|
|
|
|
|
|
| |
Scroll events do not have a position, so they shouldn't implement the
GdkEventClass.get_position() virtual function; nor they should have an x
and y fields that never get updated.
|
| |
|
|
|
|
| |
Avoid accessing the event structure directly, even from within GTK.
|
|
|
|
| |
This fixes several typos and missing references
|
|
|
|
|
| |
We moved from returning a list to returning a C array, and this requires
a change in the annotations.
|
|
|
|
| |
Instead of a less efficient GList.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We currently calling gdk_display_map_keyval up to
once per key event per shortcut trigger, and that function
does an expensive loop over the entire keymap and
allocates an array. Avoid this by caching the entries
in a single array, and have a lookup table for finding
the entries for a keyval.
To do this, change the GdkKeymap.get_entries_for_keyval
signature, and change the ::keys-changed signal to be
RUN_FIRST, since we want to clear the cache in the class
handler before running signal handlers. These changes are
possible now, since keymaps are no longer public API.
|