Commit Graph

11753 Commits

Author SHA1 Message Date
Benjamin Otte
b3c6a98132 vulkan: Add a missing extension
We need to enable this one, too.

Thanks validation layers!
2024-05-16 02:24:17 +02:00
Dr. David Alan Gilbert
14f1a91bff gdk: Remove unused struct 'XPointerUngrabInfo'
'XPointerUngrabInfo' appears unused since
commit 26cbf87d7d ("New approach for grab tracking code")
Remove it.

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
2024-05-12 01:06:31 +01:00
Matthias Clasen
c61d8bc188 wayland: Tweak cursor sizing code
We want to take advantage of a viewporter also for named cursors.
2024-05-10 23:10:50 -04:00
Benjamin Otte
4814c5f653 array: Don't overflow array size
Copy what gcc's libstdc++ does for vectors to avoid overflows:

1. Define a max size macro and assert against it
   Note that we don't assert but actually check, because this needs
   to abort even if assertions are disabled.
2. Don't do fancy math to compute new capacity.
   Just size *= 2 instead and be careful about overflow.
2024-05-10 21:22:03 -04:00
Benjamin Otte
bc17dfa83d dmabuf: Ref previous context
In case the context's only reference was held by being the current
context, setting the new context would free it.

Resetting it later would then be a use-after-free.

Fixes #6694
2024-05-07 00:34:47 +02:00
Doğukan Korkmaztürk
7c3de4a2da vulkan: Recreate swapchain when it is necessary or beneficial
Currently, GTK does not check the result of vkAcquireNextImageKHR() and
assumes that it always succeeds. As a result, the vkQueuePresentKHR() is
unconditionally set to wait for the semaphore passed to
vkAcquireNextImageKHR() earlier.

However, if vkAcquireNextImageKHR() fails for some reason, the semaphore
passed to it does not get signalled. This causes the presentation
command to wait for the semaphore to be signalled indefinitely, which
causes GTK to hang.

This change adds error handling around vkAcquireNextImageKHR() to make
GTK recreate the Vulkan swapchain when it is necessary or beneficial and
helps avoiding situations that could cause indefinite waits.
2024-05-04 22:14:33 -04:00
Matthias Clasen
f579b171a9 Merge branch 'gbsneto/more-win32-cleanups' into 'main'
Various cleanups around Win32

See merge request GNOME/gtk!7223
2024-05-03 17:27:05 +00:00
Georges Basile Stavracas Neto
7d2ad604d2 win32/vulkancontext: Remove unused variable
Silences a compiler warning.
2024-05-03 09:52:57 -03:00
Georges Basile Stavracas Neto
45e64b915c win32/wgl: Initialize hwnd to NULL
Otherwise there's a valid code path that may return it uninitialized.
2024-05-03 09:51:46 -03:00
Georges Basile Stavracas Neto
ebaef9f18b win32/cursor: Ignore GdkPixbuf deprecation warning
Seems harmless to ignore this for now, other bits of code also ignore
this.
2024-05-03 09:49:46 -03:00
Robert Ancell
c73fe8ac4a glcontext: Remove duplicate check for GL version 2024-05-03 16:40:01 +12:00
Matthias Clasen
6f42f8ef2c Revert "gdk/frameclock: add mark when we discover frames may drop"
This reverts commit 84a304e66e.

This produces marks that are confusing to me. They don't correlate
with actual gaps in the frame cycle and often overlap with regular
'window presented' marks. Also, the function we are emitting these
marks from is called from the get_frame_time getter, and we
definitely don't want to emit marks from there.
2024-05-01 08:03:16 -04:00
Matthias Clasen
1bbca0cd25 vulkan: Don't forget to update the cache size
In order for the size change check to make sense, vk_pipeline_cache_size
needs to correspond to the size of the cache we last wrote to disk.

We were forgetting to update it after saving the cache, so the
check was ineffective.
2024-04-30 08:28:39 -04:00
Matthias Clasen
83784c17a3 vulkan: Improve logging around caches
Add some more logging around the pipeline cache.
2024-04-30 08:28:39 -04:00
Matthias Clasen
119a07e055 vulkan: Add a profiler mark for pipeline cache save
This is a rare event, and the file isn't small, so show it in profiles.
2024-04-30 07:36:42 -04:00
Matthias Clasen
6022fbcdf8 vulkan: Add profiling to Vulkan initialization
This helps understanding where our startup time is spent.
2024-04-29 18:28:03 -04:00
Matthias Clasen
744016e768 Merge branch 'matthiasc/for-main' into 'main'
gsk: Drop statistics from GSK_DEBUG=renderer

See merge request GNOME/gtk!7203
2024-04-29 18:30:59 +00:00
Matthias Clasen
e540022869 x11: Implement a missing method
Vulkan on X11 was getting spew for missing an empty_frame
implementation.
2024-04-29 12:12:22 -04:00
Benjamin Otte
e6700405c9 dmabuf: Use narrow range instead of full range
It's way more common, and Mutter uses it, too.

Avoid visual glitches when going in/out of offload.

Fixes #6672
2024-04-29 14:30:56 +02:00
Matthias Clasen
08d1353cde loaders: Make it possible to load png options
We want to store some metadata in our symbolic pngs, so make it
possible to get options when loading a png, along with the texture.

Update all callers.
2024-04-28 23:42:02 -04:00
Benjamin Otte
c20e7a0c5d glcontext: Split dmabuf import codepaths
Use different codepaths for known formats vs unknown formats.

Be more careful with unknown formats and always import them as
GL_TEXTURE_EXTERNAL_OES when possible (GL can't do EXTERNAL) to avoid
problems.

This is a more defensive approach towards older drivers that don't
support modifiers.

This fixes importing YUV textures on AMD Gen8.

Another approach would be to check for YUV and never try
GL_TEXTURE_2D with them, but I decided to go this way first.

Fixes #6668
2024-04-28 13:51:42 +02:00
Matthias Clasen
b98c86fb7b wayland: Break out dmabuf feedback code
This will need to be used in surfaces as well, in the future.
Prepare for that by moving this code into its own file and struct.
2024-04-27 11:47:26 -04:00
Matthias Clasen
2711cb8dcd Merge branch 'wip/xdg-activation-token' into 'main'
Improve xdg-activation-token handling for non-dbus activation

See merge request GNOME/gtk!7118
2024-04-26 18:32:08 +00:00
Matthias Clasen
3fc9de7539 offload: Make logging more compact
Use a format of

[XXX] SYMBOL DETAILS

where SYMBOL indicates the offloading status:
 🗙 - no offload
 ▲ - offload above, with background
 △ - offload above, no background
 ▼ - offload below, with background
 ▽ - offload below, no background
2024-04-24 22:01:56 -04:00
Matthias Clasen
492940205e Merge branch 'amolenaar/macos-fix-nsapp-shortcuts' into 'main'
macos: fix in-app native shortcuts (regression)

See merge request GNOME/gtk!7178
2024-04-25 01:35:59 +00:00
Arjan Molenaar
985e4906c8 macos: Add some docs for the different NSEvent getters 2024-04-24 23:49:37 +02:00
Chun-wei Fan
54a86a2a7e Win32 GL: Also force not to use depth/stencil/accum bits on legacy contexts
For completeness' sake, also specifiy in the PIXELFORMATDESCRIPTOR to use no
depth, stencil and accum bits to initializing WGL when we can't (yet) use
wglChoosePixelFormatARB(), as we must always fist have a base legacy WGL
context using ChoosePixelFormat() before we can use that to use
wglChoosePixelFormatARB(), or if wglChoosePixelFormatARB() is somehow not
available for us.

Some drivers, however, enforces enabling depth buffers, so if we can't
acquire a pixel format that disables depth buffers, retry acquiring one
with that, which sadly is not optimal but we must make do.

Attempts to complete fix for issue #6401.
2024-04-24 16:23:17 +08:00
Matthias Clasen
a2854af325 macos: Respect the default-settings debug key
This makes our behavior more consistent across platforms.
The suggestion came up in discussion in #6545.
2024-04-23 07:52:25 -04:00
Arjan Molenaar
f004f14b89 macos: fix in-app native shortcuts (again)
Popping an event of the queue in the IMContext handler
prevents it from being forwarded to the NSApp, in case the
(key) event was not handled by IMContext.

So I reverted to a mix of the original (4.13) and new (4.14.1) behavior
for fetching events: NSEvent lookup for IMContext uses loose matching,
so it can work with rewritten events. When sending events to NSApp, only
we're checking for an exact match.

Now in-app keyboard shortcuts (e.g. Ctrl-F2) work from within text
fields again.
2024-04-23 08:57:09 +02:00
Matthias Clasen
2e0f411de9 Merge branch 'amolenaar/macos-fix-delayed-rendering' into 'main'
macos: Avoid repeatedly sending events back to macOS

See merge request GNOME/gtk!7158
2024-04-22 16:25:57 +00:00
Matthias Clasen
9f358ac655 Merge branch 'matthiasc/for-main' into 'main'
roaring: Fix some ubsan warnings

See merge request GNOME/gtk!7165
2024-04-22 15:52:04 +00:00
Sebastian Wick
6b2b6ceb74 gdk: Consider XDG_ACTIVATION_TOKEN for the startup notification id
We prefer it over the old DESKTOP_STARTUP_ID environment variable if we
have it and it is valid.

We have to stash and unset XDG_ACTIVATION_TOKEN in addition to
DESKTOP_STARTUP_ID now as well. This makes sure that we don't call any
library functions which might rely on some environment variables. This
way unsetting the environment variables is safe and we can then
afterwards validate and print warnings.
2024-04-22 17:13:21 +02:00
Arjan Molenaar
f81038e99a macos: Avoid repeatedly sending events back to macOS
in the old approach it was possible that one NSEvent was
sent to the underlying NSApp multiple times. This resulted in
those events being forwarded to our (glib) event queue again.

The visual result was that no screen updates were done. Under the hood
the application was very busy with passing events around.

By popping the events off of our event queue, we make sure they're sent
only once.
2024-04-22 15:51:12 +02:00
Alice Mikhaylenko
007e7c68dc wayland: Consistently handle enum type
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/6649
2024-04-22 17:18:11 +04:00
Matthias Clasen
815df9a76a wayland: Fix an ubsan warning
dev_t requires 8-byte alignment, so we need to use memcpy.
2024-04-21 21:32:41 -04:00
Matthias Clasen
3bd97590a1 wayland: Tweak a debug message
We aren't drawing to subsurfaces.
2024-04-21 20:37:45 -04:00
Matthias Clasen
722a0fa36d wayland: Check subsurface backgrounds better
Do the same checks for background coordinates that we do for the
subsurface coordinates themselves: they must be integral in both
application and device pixels.
2024-04-21 20:33:29 -04:00
Matthias Clasen
b21708c5e4 offload: Consolidate logging a bit
Spew a bit less per-frame. Unfortunately, we still spew for
every frame, and fixing that would require more extensive
refactoring to centralize all logging in gskoffload.c
2024-04-21 20:18:38 -04:00
Matthias Clasen
b5fb584316 wayland: Use gdk_debug_message consistently
For debug messages, we should always use gdk_debug_message.
2024-04-21 19:41:49 -04:00
Matthias Clasen
c0caae0ff0 wayland: Use wl_compositor version 6
This gives us events for preferred_buffer_scale (which we ignore)
and preferred_buffer_transform (which we also currently ignore).
2024-04-21 19:27:58 -04:00
Matthias Clasen
4b0d17b332 wayland: Fix an offload cornercase
Treat textures with background as opaque for the purposes of
offloading.
2024-04-21 12:21:40 -04:00
Matthias Clasen
c1327e2c1b gdk: Deprecate public cursor theme setters
No need for this api, we've made the frontend setter private
for a reason.
2024-04-20 07:50:10 -04:00
Matthias Clasen
5f7cab4632 Add a new font rendering setting
Add a high-level setting that gives us more freedom to tweak
font rendering knobs according to our needs. It has a 'manual'
value that lets users continue to influence font rendering using
the low-level font-related settings as before.

Once the schemas have this, we can support setting this session-wide.
See https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/-/merge_requests/79

The initial implementation of 'automatic' font rendering is fairly
simplistic: if the monitor dpi is less than 200, prefer sharpness,
so turn on metrics hinting and slight hinting. If the monitor dpi
is at least 200, we both off.
2024-04-19 12:56:34 -04:00
Matthias Clasen
558db5a3a7 settings: Allow enums as settings
We can easily handle this, and it makes such settings appear
more natural, e.g. in the inspector.
2024-04-19 12:56:34 -04:00
Matthias Clasen
74a1c0916a Add a missing deprecation note
GdkVulkanContext is deprecated and only exposed in the api because
we need it as return type of the (deprecated)
gdk_surface_create_vulkan_context() API.
2024-04-18 12:49:18 -04:00
Matthias Clasen
8de5a94eb7 Merge branch 'fixwmhints' into 'main'
x11: Remove last_wmspec_check_time

Closes #6558

See merge request GNOME/gtk!7145
2024-04-17 15:31:26 +00:00
oreo639
ab33b56ec9 x11: Remove last_wmspec_check_time
In fetch_net_wm_check_window(), before updating the wmspec_check_window, a
check is performed to verify a 15s difference between last_wmspec_check_time
and the current monotonic time.

The comment suggests that this check is done to ensure that it doesn't check
for a new check window repeatedly over and over again. While that was the case
origionally, currently the last_wmspec_check_time only gets updated when
wmspec_check_window is set, which is already checked earlier, making the time
check useless.

This check causes issues on cold boots where gtk4 applications are not able
to obtain the wmspec_check_window until 15 seconds after boot, making gtk
unable to check for extended wm_hints during that time.

Fixes: #6558
2024-04-16 12:35:00 -07:00
Matthias Clasen
0e5f7601e4 Add some inline rgba functions
These are trivial enough to inline everywhere.
2024-04-15 22:57:01 -04:00
Matthias Clasen
40f26ea09b Drop another unwanted file 2024-04-15 21:40:52 -04:00
Matthias Clasen
00739718ab Drop unwanted files 2024-04-15 20:50:27 -04:00
Matthias Clasen
fbe000734a wayland: Refuse offloading when we can't
If we have a subsurface with background, but no single-pixel
buffer support, refuse to offload.
2024-04-15 19:53:46 -04:00
Matthias Clasen
0c67b367ac subsurface: Tweak the attach implementation
Do the backend call before changing the stacking order in the
frontend. This is necessary so the backend can look at the current
stacking order to determine if it will change.
2024-04-15 19:53:46 -04:00
Matthias Clasen
f75b4aac1d wayland: Minimize work for subsurfaces
Only commit things that have changed. In the ideal scenario, only
the texture changes from frame to frame, and all the sizing related
setup and the background stay the same, causing the least amount
of work in the compositor.
2024-04-15 19:53:46 -04:00
Matthias Clasen
d563d158c0 subsurface: Add gdk_subsurface_get_sibling
This was just a missing getter. The backend implementation will
use this information to determine whether stacking changes.
2024-04-15 19:53:46 -04:00
Matthias Clasen
a44598772d wayland: Use subsurface bounds for holes
When punching a hole into the opaque region, use the subsurface
bounds, which takes both the texture and the background into
account.
2024-04-15 19:53:46 -04:00
Matthias Clasen
933a0e5a98 subsurface: Some api revision and documentation
Rename things so they make more sense. The dest/source naming got
a bit unclear when we added background into the mix. Now we're going
for:

source_rect - the texture region to display
texture_rect - dimensions of the subsurface showing the texture
background_rect - dimensions of the background subsurface
bounds - union of texture_rect and background_rect

Also use this opportunity to add some api docs.
2024-04-15 19:53:46 -04:00
Matthias Clasen
3f9bdaa4c8 Add background to subsurfaces
Make it possible for subsurfaces to have a black background on a
secondary subsurface below the actual subsurface. Using a single-pixel
buffer for that background increases the changes that the compositor
will use direct scanout for the actual subsurface.

This changes the private subsurface API. All callers have been
updated to pass an empty background rect.
2024-04-15 19:53:46 -04:00
Robert Mader
a70998aa50 wayland: Support the single-pixel-buffer protocol
This just gets the manager object. It is not used yet.
2024-04-15 19:53:46 -04:00
Matthias Clasen
0fb1f44eec gdk: Add a debug flag to allow non-dmabuf offload
This is useful for debugging offloading without having to rely
on gstreamer giving us dmabufs. To use it, set

GDK_DEBUG=force-offload

in the environment.
2024-04-15 19:53:46 -04:00
Matthias Clasen
1c8b22cf05 subsurface: Cosmetics 2024-04-15 19:53:46 -04:00
Matthias Clasen
fc405f8882 wayland: Cosmetics
Don't clear the same pointer twice.
2024-04-13 17:22:42 -04:00
Robert Mader
9583195e96 gdk/wayland: Make the surface handle empty commits
In order to avoid some code duplication and ensure the Cairo and
Vulkan implementations behave like the GL one.
2024-04-12 17:04:54 +02:00
Philip Withnall
680dba6524
gdk: Fix a maybe-uninitialized warning
If there somehow end up being no `supported_versions`, `ctx` would end
up being dereferenced before being initialised. While I think that’s
unlikely, the compiler doesn’t know that, so let’s just initialise the
variable unconditionally.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-04-12 12:03:29 +01:00
Matthias Clasen
d1bb1d091c Merge branch 'gdk-build-dep-fix' into 'main'
build: Add a missing dependency

Closes #6618

See merge request GNOME/gtk!7127
2024-04-11 20:57:34 +00:00
Matthias Clasen
6510b876d1 build: Add a missing dependency
Add the generated gdk headers to the sources for all the backends,
to guarantee that they are generated before the library is used.

Fixes: #6618
2024-04-11 15:47:38 -04:00
Matthias Clasen
4889199b14 Merge branch 'glarea-dispose-fix' into 'main'
dmabuf texture: Survive multiple disposes

Closes #6623

See merge request GNOME/gtk!7131
2024-04-11 18:20:12 +00:00
Luca Bacci
2e15225446 Merge branch 'remove-work-arounds' into 'main'
GdkWin32: Remove some work arounds that are not needed anymore

Closes #6614

See merge request GNOME/gtk!7114
2024-04-11 17:03:08 +00:00
Matthias Clasen
ed072b4b5d dmabuf texture: Survive multiple disposes
dispose can be called more than once, so be safe for that.
2024-04-11 12:45:24 -04:00
Matthias Clasen
06e905f87d Merge branch 'gtk-wlmod' into 'main'
Meson: Use wayland module

See merge request GNOME/gtk!7126
2024-04-11 01:29:29 +00:00
Xavier Claessens
95a8def7c2 Meson: Use wayland module 2024-04-10 11:43:04 -04:00
Matthias Clasen
8068111c6e Merge branch 'fix-xi2-input-source-type-debug-msg' into 'main'
xi2: Fix incorrect input source type in Input debug message

Closes #6619

See merge request GNOME/gtk!7120
2024-04-10 00:45:14 +00:00
Matthias Clasen
aed4ced032 Merge branch 'broadway-port-2972-3130' into 'main'
[gtk4] gdk/broadway: Port !2972 and !3130 from gtk3

See merge request GNOME/gtk!4467
2024-04-10 00:12:28 +00:00
Matthias Clasen
a63e9d38fb gdk: Add private convenience api
Add a function to get the monitor resolution.

We may use this information in the future to make font rendering
decisions.
2024-04-09 19:13:34 -04:00
Hansem Ro
d90dc7f75e xi2: Fix incorrect input source type in Input debug message
This drops cursor and eraser source names to account for their removal
from GdkInputSource so that GDK_DEBUG=input debug message correctly
prints source type in X11 environment.

Fixes: c1d90273 ("gdk: Drop GDK_SOURCE_ERASER")
Fixes: 3285f52d ("gdk: Drop GDK_SOURCE_CURSOR")
Closes: #6619
2024-04-08 10:15:00 -07:00
Matthias Clasen
2b09f5ea1e dmabuf: Reshuffle docs slightly
Move related parts together, for easier understanding.
2024-04-07 13:03:13 -04:00
Matthias Clasen
85f2e1ccd8 Add gdk_dmabuf_texture_builder_set_dmabuf
Private utility api.
2024-04-07 11:12:13 -04:00
Matthias Clasen
91b98bc9e2 Add a private header
Just cosmetic reshuffling.
2024-04-07 11:12:13 -04:00
Matthias Clasen
72e9f30937 subsurface: Add transforms
Allow to specify a D₂ transform when attaching a texture to a
subsurface, to handle flipped and rotated content. The Wayland
implementation handles these transforms by setting a buffer
transform on the subsurface.

All callers have been updated to pass GDK_TEXTURE_TRANSFORM_NORMAL.
2024-04-07 11:02:40 -04:00
Luca Bacci
3c94e91e5e GdkWin32: Do not clear surface contents when restoring from minimize
The code does not work anyway since we dropped WS_EX_LAYERED windows.
2024-04-06 10:58:40 +02:00
Luca Bacci
8a1bee1d79 GdkWin32: Don't explicitly set the transient owner as active
...when a transient child is hidden.

The system does that automatically
2024-04-06 10:58:25 +02:00
Luca Bacci
9297439de4 GdkWin32: Remove some work arounds that are not needed anymore
2cc650ce was added to work around some of the regressions
introduced by 79557271, but that commit was finally reverted
in 43476c09.

We can now revert 2cc650ce as well.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/6614
2024-04-06 10:44:02 +02:00
Matthias Clasen
c5d05fdc88 wayland: Work around mutter deficiences
Add the environment variable NO_POINTER_VIEWPORT to force the use
of buffer scale for pointer surfaces. This is a temporary workaround
for https://gitlab.gnome.org/GNOME/mutter/-/issues/2633.
2024-04-05 11:13:24 +02:00
Matthias Clasen
1275a2cb8d wayland: Use a viewport for pointer surfaces
This should give us more flexibility for buffer size vs surface
size.

Unfortunately, mutter doesn't play along currently, so this is
only useful for kwin, weston or sway.
2024-04-04 01:07:28 +02:00
Matthias Clasen
67a6f343a0 wayland: Keep pointer_output_scale as double
We can round up to the next integer when we need to.
2024-04-04 01:07:28 +02:00
Matthias Clasen
d0f5644771 macos: Handle callback cursors
This implementation matches the X11 one closely.
2024-04-04 01:07:28 +02:00
Matthias Clasen
b1a3ac8330 win32: Handle callback cursors
This implementation matches the X11 one closely.
2024-04-04 01:07:28 +02:00
Matthias Clasen
80811069ac x11: Handle callback cursors
For these cursors, get the texture for the cursor image by
calling the callback. We always use scale 1.
2024-04-04 01:07:28 +02:00
Matthias Clasen
6e3dc1e669 wayland: Handle callback cursors
For these cursors, get the texture for the cursor image by
calling the callback. We don't do any caching of the cursor
images for now.
2024-04-04 01:07:28 +02:00
Matthias Clasen
d1aa0a74e4 gdk: Add callback cursors
Add a variant of GdkCursor that obtains the texture for the cursor
via a callback. The callback gives us the flexibility to handle
fractional scales and update the cursor for cursor theme size
changes as well as scale changes.
2024-04-04 01:07:28 +02:00
Carlos Garnacho
af4c9ea61e Merge branch 'provide-touch-serial-later' into 'main'
gdk/wayland: Proivde latest touch serial even after a touch ended

See merge request GNOME/gtk!5782
2024-04-03 08:43:03 +00:00
Chris Williams
979d0f4b1d wayland: Fix detection of empty settings portal response
The ReadAll method returns a one-element tuple, so
g_variant_n_children() is always 1.
2024-04-01 10:33:00 -04:00
Emmanuele Bassi
9509876f10 docs: Fix the reference link 2024-03-29 13:31:36 +00:00
Benjamin Otte
91e3bc4496 wayland: On hide, remove frame callbacks from subsurfaces
Fixes subsurfaces receiving frame callbacks while the surface is hidden
or already destroyed.

Fixes #6582
2024-03-28 20:29:06 +01:00
Matthias Clasen
c5f73cb406 Tweak the eglconfig description once more
Just always print the depth and stencil buffer depth,
for maximum clarity.
2024-03-27 16:30:27 +01:00
Luca Bacci
e6a86f61dc Merge branch 'fix-issue-3749' into 'main'
GdkWin32: Always set WS_MINIMIZEBOX on GdkToplevel

Closes #3749

See merge request GNOME/gtk!7072
2024-03-22 17:57:06 +00:00
Luca Bacci
8ffa681e02 GdkWin32: Always set WS_MINIMIZEBOX on GdkToplevel
Regardless if server-side decorated or not. This way the shell knows
that the window can be minimized.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3749
2024-03-22 16:47:59 +01:00
Matthias Clasen
f6c4d3731c dnd: Go back to using dnd-move as move cursor
The move cursor in Adwaita is stuck with the 4-headed arrow image
which isn't suitable for a dnd cursor.

See https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/issues/286
2024-03-21 21:36:38 -04:00
Matthias Clasen
5e9070145e wayland: Guarantee dnd-move as a cursor name
We need to go back to using this, since move is widely abused
and thus can't change its image to one thats appropriate for dnd.
2024-03-21 21:35:45 -04:00
Christian Hergert
53616a73e9 gdk/wayland: use wp_presentation for more accurate frame timings
This attempts to improve the accuracy for the "presentation_time" of an
individual GdkFrameTimings. That information is currently filled in as soon
as we get a frame callback. However, if presentation-time wayland protocol
is available, that will be used to supliment a more accurate time which
may improve future presentation-time predictions within GdkFrameClockIdle.

The protocol states that all related and sub surfaces will receive the
same information so it is safe that this could be registered for more
than just the toplevel. The information becomes idempotent.
2024-03-20 14:45:58 -07:00
Matthias Clasen
191f826075 wayland: Only set buffer scale if we can
We check this in some other places, so be consistent.
2024-03-19 22:22:53 -04:00