Save the information whether the cursor in use is the default one, and
don't create a new cursor object in that case.
We previously created a new cursor object every frame just to compare it
to the current cursor in use and then throw it away.
The skip-taskbar, skip-pager and urgency hints were
only ever implemented for X11, and are not very useful
with modern desktops. Relegate the functionality to
x11 backend api, and drop the GtkWindow api.
And update the surface accordingly (eg. scale on hidpi). The mechanism
that did that for wl_pointer has been made generic so it can be shared
with tablets too.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1675
_gdk_wayland_cursor_get_buffer was not initializing
its out variables in the 'not found' case. This
was showing up in protocol traces as garbage hotspots
being sent to the compositor.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1328
Change the all the begin_drag and begin_move apis in
GdkSurface and GtkWindow to expect surface coordinates.
Update the x11 implementation to translate to root
coordinates where it matters. Wayland is ignoring the
coordinates anyway.
When the user approaches a tablet tool to the screen we get a proximity-in event
and in this moment we need to check the surface output scale to find the scaling
to be applied to the cursor.
And the same should be done when the tool is detached or the monitors
configuration changes.
https://gitlab.gnome.org/GNOME/gtk/issues/1675
Some of the flags got lost in the meson transition or were demoted from
error flags to warning flags.
This commit reintroduces them.
It also includes fixes for the code that had warnings with those flags.
The big one being -Wshadow.
As per the spec:
> The back buffer can
> either be reported as invalid (has an age of 0) or it may be
> reported to contain the contents from n frames prior to the
> current frame.
So a buffer age of 1 means that the buffer was used in the last frame.
We were handling buffer_age==1 the same as buffer_age==0, i.e. we
returned the full damage for the surface.
[1] https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_buffer_age.txt
When we decide to fall back because the settings portal
is not present, adhere to that decision elsewhere. And
treat the fontconfig-timestamp like the other special-cased
settings, with G_TYPE_NONE.
Under Wayland, we are currently directly using GSettings
for desktop settings. But in a sandbox, we may not have
access to dconf, so this may fail. Use the new settings
portal instead.
As GSettings now supports session-specific defaults, GNOME Classic
no longer uses a separate schema and the decoration layout is always
determined by the regular schema.
This essentially reverts commit add67b516c (although the code was
moved since then).
https://gitlab.gnome.org/GNOME/gtk/merge_requests/400
Let's just use the fact that a window was mapped as a subsurface to
remap it above another transient parent instead of relying on the more
complicated 'should-map-as-subsurface' helper function.
GLib master propagates argument types in g_clear_pointer(), which causes
the usual function pointer casts to GDestroyNotify to trip compiler
warnings. Additionally, this commit changes some cleanup functions where
appropriate (wl_data_source_destroy ->
gtk_primary_selection_source_destroy for struct
gtk_primary_selection_source).
Change GdkDrag::action to GdkDrag::selected-action, which is
more clearly different from actions, and follows the existing
name of the struct field and getter.
This lets us drop the ::action-changed signal for the
property change notification. But, can just as well move
the signal class handers which just update the cursor
to the ::action setter. No need to do this in the backends.