Now that GdkSurface has properties, it makes
sense to turn the frame clock into one too.
This will make it easier to reshuffle some
of the surface constructors later.
Make find_grab_input_seat return a GdkWaylandSeat
instead of a struct wl_seat, so we can use it and
avoid calling gdk_display_get_default_seat when
we need to get a serial later.
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
This function is a (private) function to parse a GdkRGBA accoridng to
the CSS specs. We should probably use it for gdk_rgba_parse(), but that
would change the syntax we accept there...
This also introduces a dependency of libgdk on libgtkcss.
So far, no users for this function exist.
This library is meant to be the new CSS library that gets used from GDK,
GSK and GTK for string printing and parsing.
As a first step, move GtkCssProviderError into it.
While doing so, split it into GtkCssParserError (for critical problems)
and GtkCssParserWarning (for non-critical problems).
Since commit 3b2f9395, the frame time may be set into the future, so
only ensure monotonicity, and don't store the offset. This prevents the
frame time from becoming out of sync with g_get_monotonic_time().
Fixes#1612
We preiously did not apply the resizes and moves as they were previously
only done in the Cairo drawing context on Win32. Fix this by applying
this too in the GL drawing context.
Make gdk_win32_surface_get_queued_window_rect() and
gdk_win32_surface_apply_queued_move_resize() not static functions, as we
want to use them in gdkglcontext-win32.c, to fix resizing and moving.
As in commit d45996c, the x and y coordinates passed into begin_drag and
begin_move are no longer root coordinates but are now surface
coordinates.
Use the x and y surface coordinates to acquire the root x and y
coordinates so that resizing and moving can work as expected.
I've come to the conclusion that we should keep
this state, since not all backends support per-edge
information. Updated the docs to explain how the
tiled state relates to the per-edge states.
This is nice when you want to make a "screenshot" by using save-as.
Its not going to perform as well though, so you have to enable it
by adding ?datauri to the url
This is not ideal because we report the time of a full roundtrip, rather
than the presentation time, but its better than nothing, and i'm not sure
how the browser time should be reconciled.