pop-os / cosmic-panel

WIP
GNU General Public License v3.0
113 stars 26 forks source link

Panel broken under Hyprland #289

Closed Kl4rry closed 1 day ago

Kl4rry commented 1 day ago

When running cosmic-panel under Hyprland the auto resizing of the panel freaks out and keeps changing the size of the panel. I think it might be because how Hyprland emits wlr layer shell configure events. Hyprland seems to always request a size of 1. Would it be possible get a toggle to ignore the compositors requested size? According to the wlr layer shell spec it should be valid.

Kl4rry commented 1 day ago

Or should I just bring the up the issue in Hyprland?

wash2 commented 1 day ago

Hyprland seems to always request a size of 1

While there may be a panel bug, if Hyprland is really requesting a size of 1, then the panel isn't wrong to respect the size. I'm not sure if I want to add extra complexity that is effectively a workaround to weird behavior. If Hyprland wants the panel to pick its own size, it should send a zero size, or if there are anchors to opposite sides of the output, then it should send the size of the output on that axis.

Or should I just bring the up the issue in Hyprland?

Based on what you said, ya.

ids1024 commented 1 day ago

I think generally an xdg-shell or layer-shell client shouldn't try to use a size larger than the configure it gets from the server. The client is allowed to attach a larger buffer, but (at least with xdg-shell) the server may just cut off the extra size.

If hyprland differs from smithay and wlroots here, and there isn't anything obviously wrong in how cosmic-panel is using the protocol, it's probably a hyprland bug.

Kl4rry commented 1 day ago

Cool, thanks!