Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for maximizing windows in GUI protocol #9492

Open
3 tasks
DemiMarie opened this issue Oct 6, 2024 · 2 comments
Open
3 tasks

Support for maximizing windows in GUI protocol #9492

DemiMarie opened this issue Oct 6, 2024 · 2 comments
Labels
C: gui-virtualization P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.

Comments

@DemiMarie
Copy link

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.)

  • Implement WINDOW_FLAGS_MAXIMIZED in GUI daemon.
  • Implement WINDOW_FLAGS_MAXIMIZED in GUI agent.
  • (Optional) Backport to R4.2.
@DemiMarie DemiMarie added T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. labels Oct 6, 2024
@marmarek
Copy link
Member

marmarek commented Oct 6, 2024

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
Copy link
Author

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:

  • If the window is resized, the compositor-provided size is a maximum. The client is allowed to use a smaller value but not a larger one.
  • If the window is maximized, the compositor-provided size must be used. If the client does not use it, the client is disconnected.
  • If the window is fullscreen, the client must use the compositor-provided size or there will be gaps around it.
  • If the window is tiled, the client is probably expected to use the compositor-provided size. If it doesn’t, the compositor will use a fallback behavior, such as clipping the surface or drawing a black border.

@andrewdavidwong andrewdavidwong changed the title GUI protocol does not support window maximize Support for maximizing windows in GUI protocol Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: gui-virtualization P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.
Projects
None yet
Development

No branches or pull requests

3 participants