Skip to content

frames: Consider events on fullscreen windows to be on the client area

Fullscreen X11 windows that attempt to change the resolution on Wayland use a surface viewport to achieve this without affecting the resolution of the display. This however also means that pointer events will be delivered in the display coordinates while the code handling the window frame is not aware of any such viewport scaling. So a right click outside of the area corresponding to the new resolution will not be considered to be on the client area. And since the only area that is ignored when determining whether to perform the right click action, such as opening the context menu, is the client area, this will result in the action being performed, despite happening on the (scaled) client area.

While it would be possible to scale the event coordinates so that get_control() correctly determines the frame element the cursor is on, viewport scaling only affects fullscreen windows. Since fullscreen windows have no frame, we can always assume that if the window gets delivered an event for a fullscreen window, it is on the client area without doing any additional calculations.

Fixes #1592 (closed)

Merge request reports