Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSDs become corrupted on toggle #5497

Closed
Xyene opened this issue Jul 1, 2020 · 2 comments
Closed

CSDs become corrupted on toggle #5497

Xyene opened this issue Jul 1, 2020 · 2 comments
Labels
bug Not working as intended renderer Related to Sway's renderer

Comments

@Xyene
Copy link
Member

Xyene commented Jul 1, 2020

I believe this regressed during swaywm/wlroots@eb22ae9; the prior commit does not exhibit the same behavior. Filing under Sway since I think Sway's responsible for CSDs.

To reproduce, have a config with default_border pixel. Start kitty (latest version), and float it.

image

Run

for i in `seq 1 50`; do swaymsg border pixel && swaymsg border csd; done

Observe as window grows in size and becomes corrupted with the previous CSDs.

image

Note that on GNOME, which I understand is CSD-only, there are no borders of any kind around the window.

For extra wonkiness at this point, fullscreen kitty. Sway will start consuming a lot of CPU and become semi-unresponsive as it gets into some sort of feedback loop where the kitty window continues to grow far past the screen boundaries. Logs at this point contain a flood of

04:28:47.683 [sway/desktop/transaction.c:415] Transaction 0x558726dfde00 committing with 1 instructions
04:28:47.683 [sway/desktop/transaction.c:492] Transaction 0x558726dfde00 is ready
04:28:47.683 [sway/desktop/transaction.c:281] Applying transaction 0x558726dfde00
04:28:47.685 [sway/desktop/transaction.c:415] Transaction 0x5587264654c0 committing with 1 instructions
04:28:47.685 [sway/desktop/transaction.c:492] Transaction 0x5587264654c0 is ready
04:28:47.685 [sway/desktop/transaction.c:281] Applying transaction 0x5587264654c0

WAYLAND_DEBUG logs show Sway sending a ton of xdg_toplevel.configure events with ever-increasing dimensions.

WAYLAND_DEBUG log
[2016983.666] wl_display@1.delete_id(702)
[2016983.670] wl_display@1.delete_id(785)
[2016983.672] xdg_toplevel@28.configure(10476, 29156, array)
[2016983.677]  -> wp_viewport@738.set_destination(10476, 24)
[2016983.679]  -> wl_surface@773.commit()
[2016983.680]  -> wp_viewport@776.set_destination(4, 29180)
[2016983.682]  -> wl_surface@774.commit()
[2016983.683]  -> wl_subsurface@779.set_position(10476, -24)
[2016983.685]  -> wp_viewport@780.set_destination(4, 29180)
[2016983.687]  -> wl_surface@778.commit()
[2016983.688]  -> wl_subsurface@783.set_position(-4, 29156)
[2016983.690]  -> wp_viewport@784.set_destination(10484, 4)
[2016983.692]  -> wl_surface@782.commit()
[2016983.694]  -> wl_pointer@21.set_cursor(76444, wl_surface@3, 11, 12)
[2016983.699]  -> wl_surface@3.set_buffer_scale(1)
[2016983.701]  -> wl_surface@3.attach(wl_buffer@35, 0, 0)
[2016983.704]  -> wl_surface@3.damage(0, 0, 24, 24)
[2016983.707]  -> wl_surface@3.commit()
[2016983.722] xdg_surface@25.configure(78257)
[2016983.725]  -> xdg_surface@25.ack_configure(78257)
[2016984.179] wl_display@1.delete_id(689)
[2016984.182] wl_callback@689.done(847995068)
[2016984.184] xdg_toplevel@28.configure(10480, 29160, array)
[2016984.189]  -> wp_viewport@738.set_destination(10480, 24)
[2016984.191]  -> wl_surface@773.commit()
[2016984.192]  -> wp_viewport@776.set_destination(4, 29184)
[2016984.195]  -> wl_surface@774.commit()
[2016984.197]  -> wl_subsurface@779.set_position(10480, -24)
[2016984.200]  -> wp_viewport@780.set_destination(4, 29184)
[2016984.203]  -> wl_surface@778.commit()
[2016984.206]  -> wl_subsurface@783.set_position(-4, 29160)
[2016984.209]  -> wp_viewport@784.set_destination(10488, 4)
[2016984.212]  -> wl_surface@782.commit()
[2016984.214]  -> wl_pointer@21.set_cursor(76444, wl_surface@3, 11, 12)
[2016984.217]  -> wl_surface@3.set_buffer_scale(1)
[2016984.219]  -> wl_surface@3.attach(wl_buffer@35, 0, 0)
[2016984.223]  -> wl_surface@3.damage(0, 0, 24, 24)
[2016984.226]  -> wl_surface@3.commit()
[2016984.237] xdg_surface@25.configure(78258)
[2016984.240]  -> xdg_surface@25.ack_configure(78258)
[2016984.246] wl_buffer@750.release()
[2016984.249]  -> wl_buffer@750.destroy()
[2016984.251] wl_callback@785.done(78257)
[2016988.397]  -> wl_drm@26.create_prime_buffer(new id wl_buffer@785, fd 13, 10480, 29160, 875713089, 0, 41984, 0, 0, 0, 0)
[2016988.410]  -> wl_surface@23.attach(wl_buffer@785, 0, 0)
[2016988.415]  -> wl_surface@23.damage(0, 0, 2147483647, 2147483647)
[2016988.452]  -> wl_surface@23.commit()
[2016988.455]  -> wl_display@1.sync(new id wl_callback@689)
[2016988.461]  -> wl_surface@23.frame(new id wl_callback@702)
[2016988.464]  -> wl_surface@23.commit()
[2016989.891] wl_display@1.delete_id(750)
[2016989.894] wl_display@1.delete_id(689)
[2016989.896] xdg_toplevel@28.configure(10484, 29184, array)
[2016989.901]  -> wp_viewport@738.set_destination(10484, 24)
[2016989.904]  -> wl_surface@773.commit()
[2016989.905]  -> wp_viewport@776.set_destination(4, 29208)
[2016989.907]  -> wl_surface@774.commit()
[2016989.909]  -> wl_subsurface@779.set_position(10484, -24)
[2016989.911]  -> wp_viewport@780.set_destination(4, 29208)
[2016989.914]  -> wl_surface@778.commit()
[2016989.916]  -> wl_subsurface@783.set_position(-4, 29184)
[2016989.918]  -> wp_viewport@784.set_destination(10492, 4)
[2016989.920]  -> wl_surface@782.commit()
[2016989.922]  -> wl_pointer@21.set_cursor(76444, wl_surface@3, 11, 12)
[2016989.926]  -> wl_surface@3.set_buffer_scale(1)
[2016989.928]  -> wl_surface@3.attach(wl_buffer@35, 0, 0)
[2016989.932]  -> wl_surface@3.damage(0, 0, 24, 24)
[2016989.937]  -> wl_surface@3.commit()
[2016989.953] xdg_surface@25.configure(78259)
[2016989.955]  -> xdg_surface@25.ack_configure(78259)
@emersion
Copy link
Member

emersion commented Jul 1, 2020

GLFW draws CSDs with the viewporter extension. When the extension isn't available, GLFW doesn't draw any CSDs, even if the window has border csd.

@emersion emersion added bug Not working as intended renderer Related to Sway's renderer labels Jul 15, 2020
@vyivel
Copy link
Member

vyivel commented Jan 18, 2024

Should be closed by #6844.

@vyivel vyivel closed this as completed Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended renderer Related to Sway's renderer
Development

No branches or pull requests

3 participants