wmww / gtk-layer-shell

A library to create panels and other desktop components for Wayland using the Layer Shell protocol
GNU General Public License v3.0
313 stars 15 forks source link

Gtk layer shell windows dispear on suspend on hyprland #135

Closed godalming123 closed 1 year ago

godalming123 commented 1 year ago

If I suspend my computer and then open it my python bar hides theres no error message in the terminal I use to run it. Source code at: https://github.com/godalming123/hyprland-panel

godalming123 commented 1 year ago

This also only happens when I suspend for a while.

wmww commented 1 year ago

Strange. Does the program exit, or is the panel just hidden? Does the GTK Layer Shell demo have this problem? Do layer shell clients that don't use GTK Layer Shell also have this problem? A Wayland debug log might be helpful. You can generate that by running

WAYLAND_DEBUG=1 <your-program> 2>log.txt

That should dump all the Wayland messages to a file. If you upload the whole log that ends with the panel disappearing I can take a look.

godalming123 commented 1 year ago

The program is still running in the background without an error.

godalming123 commented 1 year ago

This is the logfile (with my bar program will see with demo later) test.log

godalming123 commented 1 year ago

Does it have anything to do with the fact that my monitor turns off this means when my laptop comes out from suspend all the windows appear on my laptop screen before going to the monitor. Will try with bar on my laptop monitor and turning monitor on before opening laptop.

wmww commented 1 year ago

I see from the log that the 2nd of two wl_outputs is being removed and then quickly re-added (presumably because of how your monitor is turning off). It seems likely that that's related, but I see no evidence that the issue is on GTK Layer Shell's side. Next step is to test with a non-GTK client that uses Layer Shell (maybe swaybar?). If the issue exists with that too, than it's the compositor's problem.

godalming123 commented 1 year ago

Will test

godalming123 commented 1 year ago

Do you know any sway bar alternatives since sway bar is not in my repos

wmww commented 1 year ago

Swaybar might come with the sway package, but it might not want to run on something other than sway. If you build wlroots you'll get a layer-shell example, which should work. That might also be available in your repos (libwlroots-examples on Ubuntu). Run that with

/usr/lib/wlroots/layer-shell -l top -a top

(adjust path as needed)

ErikReider commented 1 year ago

Do you know any sway bar alternatives since sway bar is not in my repos

Waybar is a good one

wmww commented 1 year ago

Nope, Waybar uses GTK Layer Shell

godalming123 commented 1 year ago

Tested with yambar (written in c I think using the layer shell protocol without gtk) and it also hides on suspend so I think the issue is to do with hyprland EDIT: also when I have the bar on my laptop monitor it doesn't hide

wmww commented 1 year ago

Closing for now, feel free to open new issue if the investigation leads back to this code base.

godalming123 commented 1 year ago

Thanks for your help