smithay icon indicating copy to clipboard operation
smithay copied to clipboard

resizing gtk 4 app in smallvil does not work as expected

Open i509VCB opened this issue 3 years ago • 4 comments

You need to grab the gtk4 drop shadows to resize instead of the window itself.

i509VCB avatar Aug 24 '22 01:08 i509VCB

I think you will need to support subsurfaces, otherwise shadows are treated as part of main surface.

heavyrain266 avatar Aug 24 '22 07:08 heavyrain266

I think you will need to support subsurfaces, otherwise shadows are treated as part of main surface.

We do support subsurfaces since the very beginning of the compositor module. Otherwise there would be no shadows to begin with..

Drakulix avatar Aug 24 '22 07:08 Drakulix

This is probably caused by smallvil not handling the cursor state. It does not draw the cursor provided by the client, which can include a hotspot. So I would guess the location is offset by the cursor hotspot.

cmeissl avatar Aug 30 '22 21:08 cmeissl

I think you will need to support subsurfaces, otherwise shadows are treated as part of main surface.

Smithay supports them, and GTK4 does not use them anyway, It is single XdgSurface with geometry set to window contents.

From my testing, it looks like everything is working as expected, it's just lack of cursor that makes it confusing. The hitbox in question is 1px wide, so you are basically trying to blindly hit that.

Visual representation of the hitbox of gtk4-demo: (red color is the one in question, blue is shadow) hitbox

PolyMeilex avatar Aug 31 '22 13:08 PolyMeilex