It's mandatory to reply to a xdg_surface.configure with a
xdg_surface.ack_configure, as well as a wl_surface.commit to have the
ack_configure to have any effect. We failed to do that if the new
configuration didn't cause any actual anything to change, meaning we'd
just ack_configure, but potentially never commit.
Fix this by requesting a 'after-paint' frame clock phase, while setting
the pending commit state to true. If we were already to paint, the new
requested phase would happen anyway, but to avoid double
wl_surface.commit when also using eglSwapBuffers*(), also avoid
performing the commit if we know the swap buffers will happen.
Again on massive filesystems, the very first character
is likely to bring a likewise massive amount of search
results that we need to maybe query info for, then create
icons and widgets for. While it's impressive we can do
that, it's also expensive and likely pointless, for the
first character.
Typing a second character is however very likely to
considerably reduce the amount of items to categorize and
show. So start actually searching from there.
Testing on a filesystem with 1434099 files indexed, trying 5
semi-random 1 character searches (n, h, t, i, o) returns on
average 168K items (min. 78771, max. 331471), trying 5
semi-random 2 character searches (no, he, th, in, on)
returns on average 34K items (min. 11133, max. 94961),
which is a more approachable set.
Doing this is enough that typing on a filechooser search
entry feels completely fluid.
The search provider should make it sure there are some
specific GFileInfo fields set. Fix the mimetype extraction
from the query, and use that to fill in the missing gaps
the best we can.
When starting a search over a very populated filesystem, it
is possible that typing the first chars will return a too
high number of results. Even though iterating through the
cursor is in itself very fast, extracting the GIO information
from those many files at once is not going to be as fast.
In order to increase interactivity (i.e. not make things
possibly sluggish) iterate the cursor in an idle function
and add search results to the filechooser model little by little.
If the user keeps typing (as it is likely will happen), there
will be better chances to cancel and proceed to the next
query timely. If not, the results will be there soon enough.
As fancy as property paths are, recursive resolution of files
to a location increases the big O complexity enough that it's
not a great option on large homedirs with many indexed files.
Ensure the files are from the right location through a URI
prefix match, which does hits an index. This may dramatically
improve performance on large indexed trees.
Testing this query in an isolated testcase with a total
1434099 indexed files shows that it can run more than 1500 times
per second in this computer (an average of 15200 queries in
several 10 second runs), which presumably is a tad faster than
anyone can type.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4133
Cursor themes have recently started to reduce their coverage of
'legacy' cursor names, and reduced to the standard names. Support
this for the few cursor types that are still used in GTK.
Print backend can be disposed together with all its printers
as a reaction to user stopping enumeration of printers.
Adding a weak pointer help us to detect that the backend
was disposed and hence the backend and its printers should not
be used anymore.
Fixes#6265
The GtkFileChooserEntry widget creates a file filter instance, but never
sinks its floating reference. Newer versions of GLib correctly warn if
an instance with a floating reference gets finalized.
Fixes: #6527
It is at least theoretically possible that gtk_entry_get_pixel_ranges
will return no ranges, and we should handle that without an
out-of-bounds access or segfault.
This fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1871627
All GTK3/4 apps on non-GNOME desktops aren't resizable if they are
tiled.
This patch makes the non-tiled edges resizable if we have per-edge
tiling, but not per-edge resizing information.
We might want to make all edges resizable, but that might not be fine
for tiling compositors.
The first time this function is called, has_xdg_output() returns
true, but haven't yet received all the xdg-output events, so wait
for that to be done. Otherwise, the logical size is 0, and nothing
useful comes from that.
This is the gtk3 version of !6722.
This fixes a problem that is apparent in
https://bugzilla.mozilla.org/show_bug.cgi?id=1869724, but that also
reproduces on any GTK application as described in
https://bugzilla.mozilla.org/show_bug.cgi?id=1869724#c16.
xdg_output sizes might be physical if the compositor doesn't scale them,
it seems. So to report the correct logical geometry in GDK pixels, we
need to detect this case. We do this by checking whether the wl_output
size matches the xdg_output size.