This should do nothing worthwhile anymore, the X11/Wayland GtkApplication
implementations do already pass the startup ID from the platform_data
via windowing specific APIs, and the application handling the request
via show()/present() should trigger the activation request.
(cherry-picked from commit 3526d8b299becb7cd1e970ea5228a141eae20257)
While this used to be tangential to windows showing or requesting
focus, the xdg-activation Wayland protocol does merge both concepts
together.
But also, for a correct interaction with the compositor, the
toolkit should ideally merge the activation request resulting from
both into the same one, so that the gdk_window_focus() request
replies to the startup token that started the application and
correct focus-stealing prevention/etc happens, instead making up
one just in time for the focus request.
This kind of requires doing things in the right order, a show()
request on the GtkWindow should activate any pending activation
token on the toplevel, a present() request should additionally
create a new token if there was none pending. And
xdg_activation_v1_activate() should happen once on both.
Shuffle the gdk_window_set_startup_id() calls so that this
happens in the right order for Wayland, while making X11 happy
too.
(cherry-picked from commit e8adfa2a889cd45ee0ce0727d7eae0a61fdb7dce)
In the way towards deprecating gdk_display_notify_startup_complete(),
make gdk_toplevel_set_startup_id() on X11 perform this piece of messaging
itself. It should be harmless that the message is emitted twice, if
callers do still use that API.
(cherry-picked from commit 7fab1b85adbddff7628e3e916f00677080fb9150)
This call has everything to perform activation as specified by the
xdg_activation protocol, notably a surface to activate as opposed to
gdk_notify_startup_complete().
Make activation happen here, so that the surface gets activated when
its gets a startup ID assigned.
(cherry-picked from commit 5aeabdb3d404579b5cab4fff1642ed116f745a8b)
Move the handling of the startup ID to a separate function, since
this will be called from several places.
(cherry-picked from commit 6f01f846dc66a6359a1524ace13377536821dbb0)
The cairo surface must be padded to 4 pixels in order to
transfer correctly to the GPU. The GdkWindow and GdkNSView's
content frame must be the same width, otherwise there's a mismatch
that causes either the GdkWindow to draw wider than the frame or the
frame to be clipped narrower than the title bar.
Fixes#5535.
This was causing animation and transition to stop randomly and reset
their state to initial state.
This issue has existed since commit
7b68bdb831.
Closes#4426
ClutterInputFocus/GtkIMContext uses char based offset for
delete_surrounding, however, text_input_v3 uses byte based offset for
it. Currently only GTK with mutter can work correctly via text_input_v3
because they both forget to convert between char based offset and byte
based offset.
This commit fixes it in GTK by converting byte based offset to char
based offset with the UTF-8 encoded surrounding text.
Fixes <https://gitlab.gnome.org/GNOME/gtk/-/issues/4566>.