We add recent files one at a time which is incredibly wasteful.
This is most obvious when the action is SAVE or OPEN_FOLDER because
we aren't limiting the number of recent files (as we are with OPEN),
so for me it took about 5 seconds to open a file dialog with OPEN_FOLDER
since the default location is recents.
Hint in the text how to reenable auto-reload. A button for this
is not practical in the notification itself, since it will just
crash again if you reenable it without editing the content.
When an unrealized GtkATContext (that doesn't come from a GtkWidget) is
attached to a realized parent, nothing happens. That's because, while
GtkWidget is able to realize itself at the appropriate times, that may
not be true for non-widget accessibles.
Realize the child AT context if the parent is realized, when manually
attaching the AT context to a parent.
This allows reporting the proper geometry for the AT. This is a simple
implementation that simply uses the extents of the first GtkWidget that
is parent of the GtkAtSpiSocket accessible.
GTK does not support completely detached accessible trees, so a parent
GtkWidget is guaranteed to exist. Assert that in code.
This is a GtkAccessible object that represents a connection to a remote
plug object. It is particular to the AT-SPI backend, which is why it's
made to fail when gtk_at_context_create() creates anything that is not
a GtkAtSpiContext.
The resulting accessible object created by GtkAtSpiSocket only ever has
1 child, which is the remote accessible plug object. This remote object
cannot be represented by an actual GtkAccessible instance without
copying over its contents, which is unfeasible; therefore, add special
cases in exactly 3 places in GtkAtSpiContext to handle this.
This object is made so that WebKitGTK, which renders web pages and keeps
the a11y tree of the DOM page in a separate process, can be bridged to
the GTK4 UI process.
Show the fractional scale if we have one, and pixels.
Only Wayland has fractional scales, and for monitors, we have
to derive it from the logical and physical resolution of the
monitor. Not ideal, but it works.
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 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.
According to the Mesa developers, the correct way to determine
disjointness is to check the actual inode of the fd because dup()ing can
cause these duplications to happen when planes are carelessly copied or
when planes are sent over dbus or other unix sockets.
Related: https://bugs.webkit.org/show_bug.cgi?id=267578
With GTK_ACCESSIBILITY_ATSPI as its sole define for now. This will
allow clients to conditionally include gtk/a11y/gtkatspi.h if they
need to use the AT-SPI specific functions.