client-toolkit icon indicating copy to clipboard operation
client-toolkit copied to clipboard

set_margin() of layer surface doesn't affects the pointer

Open JarKz opened this issue 1 year ago • 2 comments

Description

My task is using this library for rendering stack of notifications. Firstly I tried the example about layer surface and I liked it. So I add some code for creating more than one layer surfaces. For stacking I use the LayerSurface::set_margin to avoid collision. But I ended up with one annoying problem - the set_margin doesn't affect the pointer. When I move the layer by the set_margin method and don't move the pointer, the clicks will be delivered to the moved layer which is nonsense.

What do I do?

JarKz avatar Jun 30 '24 22:06 JarKz

Assuming the margin is visibly applied, and you've set a margin on anchored edges, I think this is most likely a compositor issue. Have you tested your application in sway or another compositor that supports layer shell?

wash2 avatar Jul 03 '24 18:07 wash2

Thank you for the answer, I appreciate it! Yeah, the changes are visible and the layouts are anchored.

I tried it only on the Hyprland compositor and haven't tried on any other.

At sunday I'll check this behavior on the sway and I'll give the feedback.

JarKz avatar Jul 05 '24 13:07 JarKz