GTK4 windows with drop shadow sets incorrect geometry on Wayland
Steps to reproduce
- Make example application3
- WAYLAND_DEBUG=1 ./exampleapp
- See the geometry set via WAYLAND_DEBUG or by trying to resize the window, the window edge is 12(?) pixels more than the actual window in every direction
Current behavior
The window edge is 12 pixels or so outside the actual window on all 4 edges. This is likely due to Gtk.HeaderBar because it's the only difference between application2 and application3, and this issue doesn't exist on application2 but does on application3.
Expected outcome
The window geometry doesn't include the drop shadows or allows disabling them
Version information
- Which version of GTK you are using: 4.10.5
- What operating system and version: openSUSE Tumbleweed
- Compositor: sway
Additional information
[3853875.105] -> xdg_surface@38.set_window_geometry(23, 23, 600, 400)
[3853875.111] -> wl_compositor@5.create_region(new id wl_region@40)
[3853875.114] -> wl_region@40.add(29, 23, 588, 6)
[3853875.115] -> wl_region@40.add(23, 29, 600, 394)
[3853875.117] -> wl_surface@33.set_opaque_region(wl_region@40)
[3853875.118] -> wl_region@40.destroy()
[3853875.119] -> wl_compositor@5.create_region(new id wl_region@44)
[3853875.120] -> wl_region@44.add(11, 11, 624, 424)
[3853875.121] -> wl_surface@33.set_input_region(wl_region@44)
[3853875.122] -> wl_region@44.destroy()
[3853875.123] -> wl_surface@33.frame(new id wl_callback@41)
[3853875.125] -> wl_surface@33.offset(0, 0)
[3853875.231] -> wl_surface@33.frame(new id wl_callback@42)
[3853875.234] -> zwp_linux_dmabuf_v1@36.create_params(new id zwp_linux_buffer_params_v1@43)
[3853875.245] -> zwp_linux_buffer_params_v1@43.add(fd 16, 0, 0, 3072, 33554432, 410434307)
[3853875.248] -> zwp_linux_buffer_params_v1@43.add(fd 17, 1, 1572864, 1024, 33554432, 410434307)
[3853875.249] -> zwp_linux_buffer_params_v1@43.create_immed(new id wl_buffer@47, 646, 446, 875713089, 0)
[3853875.251] -> zwp_linux_buffer_params_v1@43.destroy()
Here we can see that the initial configure is 600x400, but for set_input_region, the region is 624x624, which is 24x24 bigger than the actual window, exactly 12 pixels more along every edge.
Edited by llyyr ⠀