This attempts to improve the somewhat "erratic" feeling of scrolling a
GtkTextView with fractional scaling. However, it also improves the
situation where you have a natural integer scaling factor such as 2x.
To do so, it quantizes the X/Y origin of the visible rect to something that
naturally alignes with device pixels. By doing so this aims to get
consistent pixel alignment when hinting so that you no longer see jumps
as the Y position of the buffer changes. X is also done for symmetry.
The buffer itself is left in integer coordinates to avoid any sort
of ABI breakage with existing applications. Only the origin x/y of the
drawing area is affected and thus should only affect the ABI of
gtk_text_view_get_visible_rect() by < 1 device pixel.
Applications which require precision in the visible rect origin may use
the new API introduced here as gtk_text_view_get_visible_offset(). This
provides the X,Y point as doubles. graphene_point_t was not used here
beacuse that appeared to cause aliasing due to float usage.
GNOME/GtkSourceView!375 provides an example of consuming this new API to
keep line numbers aligned in the same fashion as the textview contents.
a11y: When setting the selected state for list items, don't try to be smart and let the a11y layer handle deduplication.
Closes#6663
See merge request GNOME/gtk!7258
Commit b807b84e16 ("print dialog: Fix initial selection") made a
change where we connect to items-changed before the list item manager.
That leads to us attempting to set a selection for a tile that does
not yet exist.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/7109
When GL or Vulkan is not supported, the test should not fail.
It would be nicer if we could detect GL/Vulkan not being available
otherwise, but I'm not aware of a better solution, in particular because
rendeers might have stricter requirements than GTK itself.
So this is the next best fix.
We need to guarantee that we call wayland_display_read_events() after a
poll() and before any other source runs, including any source with
higher priority.
As GSourceFuncs doesn't have a after_poll() vfunc and check() is not
guaranteed to be called for anything but the highest priority, we only
have once chance:
Run with the highest priority
But because we don't want event delivery with ultrahigh priority, we
split the source into two:
* a poll source that polls while blocking wayland reading and
then immediately calls read_events() with priority G_MININT
* our old trusty event source with PRIORITY_EVENTS that dispatches
events
Fixes!7859Fixes#7091
When adding or removing css class doesn't change anything, we
should not notify the css-classes property. This is more efficient
and avoids some suboptimal behavior in the inspector.
Fixes: #7111
Instead of checking availability of a few hardcoded extensions, print a
full list of extensions.
It's a bit awkward to find the ones the GTK cares about, but it allows
quickly checking any extension that might be needed for new features or
in applications or GStreamer.
This overlaps somewhat with tools like eglinfo, but eglinfo prints all
combinations of X11/Wayland and GL/GLES so it's easy to get confused,
while this one prints the actual extensions of the device in use.
This reverts commit a9723fc96b.
This approach was wrong as it can lead to deadlocks when multiple
threads call poll() at almost the same time and the slower thread only
starts poll()ing when the faster thread has already read the fd.
See further comments for a (hopefully) correct fix.
Reverts !7859