Hyprland
Hyprland copied to clipboard
layer shell: attaching null buffer does not behave as expected
Expected behavior
Attaching a null buffer to a layer surface unmaps it.
Unmapping a layer_surface means that the surface cannot be shown by the compositor until it is explicitly mapped again. The layer_surface returns to the state it had right after layer_shell.get_layer_surface. The client can re-map the surface by performing a commit without any buffer attached, waiting for a configure event and handling it as usual.
Actual behavior
After attaching null buffer the surface disappears, but the "exclusive zone" is not shifted. Reattaching a non-null buffer does not trigger a configure event.
does it work on sway? I'd imagine something like this should be handled by wlr
it works in river, haven't tested on sway
alr
Tested sway, it is partially broken.
Reattaching a buffer does trigger a configure event, but the exclusive zone isn't cleared.
Reattaching a buffer does trigger a configure event
But only if I resize sway's window (I run it inside another wayland session). So I suppose it is just as broken.
For context: I implemented a hide/show feature in my status bar by attaching null buffer and it worked fine in river.
why not just call unmap
why not just call unmap
On which object?
wait huh
wlroots. Wat
can you link me your test client
can you link me your test client
https://github.com/MaxVerevkin/i3bar-river/tree/hyprland
No config. pkill -SIGUSR1 i3bar-river to show hide.
is this still a thing?
On 0.40.0, yes.
what about git?
I've just tried 0.41.0, it is still a thing. Worse yet, hypland crashes. Steps: hide the bar (it is hidden but the exclusive zone is not reclaimed), show the bar (nothing happens), open a terminal (crash). I've run a packaged version and the backtrace is almost useless, but here it is:
(gdb) bt full
#0 0x00007ecce0c7be44 in ??? () at /usr/lib/libc.so.6
#1 0x00007ecce0c23a30 in raise () at /usr/lib/libc.so.6
#2 0x00007ecce0c0b4c3 in abort () at /usr/lib/libc.so.6
#3 0x0000557f0090cab7 in handleUnrecoverableSignal(int) ()
#4 0x00007ecce0c23ae0 in <signal handler called> () at /usr/lib/libc.so.6
#5 0x0000557f0092affe in ??? ()
#6 0x0000557f009a5035 in CLayerSurface::onCommit() ()
#7 0x0000557f009a5769 in ??? ()
#8 0x0000557f009f2b6f in CSignalListener::emit(std::any) ()
#9 0x0000557f009f2ed1 in CSignal::emit(std::any) ()
#10 0x0000557f00ab21ce in ??? ()
#11 0x0000557f009f2b6f in CSignalListener::emit(std::any) ()
#12 0x0000557f009f2ed1 in CSignal::emit(std::any) ()
#13 0x0000557f00b3787b in ??? ()
#14 0x0000557f00b2eb61 in CWLSurfaceResource::bfHelper(std::vector<CSharedPointer<CWLSurfaceResource>, std::allocator<CSharedPointer<CWLSurfaceResource> > >, std::function<void (CSharedPointer<CWLSurfaceResource>, Vector2D const&, void*)>, void*) ()
#15 0x0000557f00b2f5c9 in CWLSurfaceResource::breadthfirst(std::function<void (CSharedPointer<CWLSurfaceResource>, Vector2D const&, void*)>, void*) ()
#16 0x0000557f00c2beb3 in ??? ()
#17 0x0000557f00bc9d66 in ??? ()
#18 0x00007ecce1095596 in ??? () at /usr/lib/libffi.so.8
#19 0x00007ecce109200e in ??? () at /usr/lib/libffi.so.8
#20 0x00007ecce1094bd3 in ffi_call () at /usr/lib/libffi.so.8
#21 0x00007ecce15fbe45 in ??? () at /usr/lib/libwayland-server.so.0
#22 0x00007ecce1600c42 in ??? () at /usr/lib/libwayland-server.so.0
#23 0x00007ecce15ff0a2 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#24 0x00007ecce160110f in wl_display_run () at /usr/lib/libwayland-server.so.0
#25 0x0000557f00a536b9 in CEventLoopManager::enterLoop(wl_display*, wl_event_loop*) ()
#26 0x0000557f008d0eb1 in main ()
wallahi I hate software development, why does waybar work then lol
try now, should be all fixed.
Yay, it works!