QubesOS / qubes-issues

The Qubes OS Project issue tracker
https://www.qubes-os.org/doc/issue-tracking/
541 stars 48 forks source link

Support for maximizing windows in GUI protocol #9492

Open DemiMarie opened 1 month ago

DemiMarie commented 1 month ago

How to file a helpful issue

The problem you're addressing (if any)

The Qubes OS GUI protocol does not support maximizing windows. This causes problems for the Wayland agent I am working on, which needs to tell clients that a window has been maximized so that they know to use the window size they have been told. It also prevents applications from requesting that they be maximized. This is not a security feature, because applications can already request that they be made fullscreen, which will be treated as a maximize request by default.

The solution you'd like

Support window maximizing. This is a very simple change in the GUI protocol.

The value to a user, and who that user might be

Applications will know they are maximized. Users of applications that rely on this will not have compatibility problems.

Completion criteria checklist

(This section is for developer use only. Please do not modify it.)

marmarek commented 1 month ago

needs to tell clients that a window has been maximized so that they know to use the window size they have been told

How is maximized window any special here? What if user intentionally resize it to half of the screen for example, shouldn't application listen to that too? And also, I'm pretty sure applications not honoring user (or window manager/compositor) requested sizes will wreak havoc on tiling layouts...

DemiMarie commented 1 month ago

needs to tell clients that a window has been maximized so that they know to use the window size they have been told

How is maximized window any special here? What if user intentionally resize it to half of the screen for example, shouldn't application listen to that too? And also, I'm pretty sure applications not honoring user (or window manager/compositor) requested sizes will wreak havoc on tiling layouts...

Some applications (like terminal emulators and image viewers) cannot really support arbitrary sizes. For terminal emulators, the constraint is that the window must be an integer number of rows and columns. For image viewers, the constraint is that the aspect ratio of the image must be preserved.

X11 clients use EWMH to inform the compositor of these constraints, but Wayland has no similar mechanism. Instead, Wayland compositors are expected to normally use client-provided sizes. However, there are various exceptions: