WayfireWM / wayfire

A modular and extensible wayland compositor
https://wayfire.org/
MIT License
2.41k stars 177 forks source link

issue with resizing views #2460

Open killown opened 2 months ago

killown commented 2 months ago

if you keep resizing a view until it disappear, wayfire events will report a weird data like {'x': 1892042110, 'y': 29637}

{'event': 'view-workspace-changed', 'from': {'x': 1892042110, 'y': 29637}, 'to': {'x': 1, 'y': 0}, 'view': {'activated': True, 'app-id': 'kitty', 'base-geometry': {'height': 6, 'width': 1, 'x': 4, 'y': 1070}, 'bbox': {'height': 15, 'width': 14, 'x': 0, 'y': 1065}, 'focusable': True, 'fullscreen': False, 'geometry': {'height': 14, 'width': 9, 'x': 0, 'y': 1066}, 'id': 314, 'last-focus-timestamp': 10820901004393, 'layer': 'workspace', 'mapped': True, 'max-size': {'height': 0, 'width': 0}, 'min-size': {'height': 0, 'width': 0}, 'minimized': False, 'output-id': 1, 'output-name': 'DP-1', 'parent': -1, 'pid': 147176, 'role': 'toplevel', 'sticky': False, 'tiled-edges': 0, 'title': '~', 'type': 'toplevel', 'wset-index': 1}}

I believe the issue is that Wayfire does not enforce minimum width/height limits for resizing views. From a logical standpoint, allowing a view to be resized to a point where it becomes impossible to focus on it is not meaningful.

soreau commented 2 months ago

Probably could use PR #2434 and add a minimum size of 1x1 or so, for views that don't set a min size.