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

Background layer does not work under Sway #140

Closed RossComputerGuy closed 1 year ago

RossComputerGuy commented 1 year ago

When using the background layer in my code, the window never render but if I use the bottom layer then it does but renders above other windows. This is my Vala code and I am unsure what I am doing wrong or if this is a bug. The demo works fine with using the background layer so this is a strange bug.

ErikReider commented 1 year ago

Probably rendering behind your wallpaper. Try killing swaybg

RossComputerGuy commented 1 year ago

Sweet, that worked. Not sure why the demo worked but not my code without killing swaybg.

RossComputerGuy commented 1 year ago

Now, I might need help with the panel window code. I can't use any windows, may be because of the margins. If I set the bottom margin to this.monitor.mode.height - 5 then Sway crashes. Also, the background doesn't render behind the panel.

Edit: input is working now, just need to get the wallpaper to render behind the panel. This is currently how it looks: image

Consolatis commented 1 year ago

Sorry for the off-topic:

If I set the bottom margin to this.monitor.mode.height - 5 then Sway crashes

If you manage to actually crash sway with a layer-shell application using margins an issue at https://github.com/swaywm/sway would be nice.

RossComputerGuy commented 1 year ago

this.monitor.mode.height - 5 is 1440 - 5 on my system.