Add max window width#1762
Conversation
mmstick
left a comment
There was a problem hiding this comment.
Fine as long as it doesn't have a regression for the default behavior.
|
Yes, by default, the max window width is zero and this functionality is ignored when max width = 0. |
jacobgkau
left a comment
There was a problem hiding this comment.
Currently, the new option does not take effect until after the next window movement operation (or a gnome-shell restart). It would be nice if it took effect immediately like the gaps settings do (easiest to test with gsettings set ...). However, I don't think it's necessary to block this on that since it's in the advanced preferences.
Aside from that, this is behaving as advertised. When set to the default value of 0, there's no change in behavior. When the new setting is set, empty space is added on both sides of windows to fill out their position in the tree beyond the configured max.
This is merging into master_noble, and does not affect any versions of Pop!_Shell being used in Pop!_OS.
Regression testing passed:
Checklists
Tasks for a tester to verify when approving a patch. Use complex window layouts and at least two displays. Turn on active hint during testing.
With tiling enabled
Tiling
- Super direction keys changes focus in the correct direction
- Also broken on
master_noble.
- Also broken on
- Windows moved with the keyboard tile into place
- Windows moved with the mouse tile into place
- Windows swap with the keyboard (test with different size windows)
- Windows can be resized with the keyboard (Test resizing four windows above, below, right, and left to ensure shortcut consistency)
- Windows can be resized with the mouse
- Minimizing a window detaches it from the tree and re-tiles remaining windows
- Unminimizing a window re-tiles the window
- Maximizing with the keyboard (
SuperM) covers tiled windows - Unmaximizing with keyboard (
SuperM) re-tiles into place - Maximizing with the mouse covers tiled windows
- Unmaximizing with mouse re-tiles into place
- Full-screening removes the active hint and full-screens on one display
- Unfull-screening adds the active hint and re-tiles into place
- Maximizing a YouTube video fills the screen and unmaximizing retiles the browser in place
- VIM shortcuts work as direction keys
-
SuperOchanges window orientation -
SuperGfloats and then re-tiles a window - Float a window with
SuperG. It should be movable and resizeable in window management mode with keyboard keys -
SuperQCloses a window - Turn off auto-tiling. New windows launch floating.
- Turn on auto-tiling. Windows automatically tile.
Stacking
- Windows can be moved into a stack.
- Windows can be moved out of a stack.
- Windows inside and outside of a stack can be swapped multiple times and in both directions.
- Moving the last window out of a stack works as expected.
- Stacks can be resized with the keyboard.
- Stacks can be resized with the mouse.
- Lock and unlock the screen-- stacks should still exist and windows should not have moved.
- Unable to lock screen in Pop!_OS 24.04 session.
- Full-screen an application within the stack, then quit the application-- the remaining tabs should be visible.
Workspaces
- Windows can be moved to another workspace with the keyboard
- Also broken on
master_noble.
- Also broken on
- Windows can be moved to another workspace with the mouse
- Windows can be moved to workspaces between existing workspaces
- Moving windows to another workspace re-tiled the previous and new workspace
- Active hint is present on the new workspace and once the window is returned to its previous workspace
- Floating windows move across workspaces
- Remove windows from the 2nd worspace in a 3 workspace setup. The 3rd workspace becomes the 2nd workspace, and tiling is unaffected by the move.
Displays
- Windows move across displays in adjustment mode with direction keys
- Windows move across displays with the mouse
- Changing the primary display moves the top bar. Window heights adjust on all monitors for the new position.
- Unplug a display - windows from the display retile on a new workspace on the remaining display
- Plug an additional display into a laptop - windows and workspaces don't changes
Launcher
- All windows on all workspaces appear on launch
- Choosing an app on another workspace moves workspaces and focus to that app
- Launching an application works
- Typing text and then removing it will re-show those windows
- Search works for applications and windows
- Search works for GNOME settings panels
- Doesn't move workspaces; also broken in
master_noble.
- Doesn't move workspaces; also broken in
- Search for "Extensions". There should be only one entry.
- The overlay hint correctly highlights the selected window
- Open windows are sorted above applications (e.g. "web browser")
- t: executes a command in a terminal
- : executes a command in sh
- = calculates an equation
- Search results are as expected:
calreturns Calendar and Calculator before Colorpopsreturns Popsicle firstshopreturns the Pop!_Shop first
Window Titles
- Disabling window titles using global (Pop Shell) option works for Shell Shortcuts, LibreOffice, etc.
- Disabling window titles in Firefox works (Check debian and flatpak packages)
Floating Exceptions
- Add a window to floating exceptions-- it should float immediately.
- Close and re-open the window-- it should float when opened.
- Add an app to floating exceptions-- it should float immediately.
- Close and re-open the app-- it should float when opened.
With Tiling Disabled
Tiling
- Super direction keys changes focus in the correct direction
- Also broken on
master_noble.
- Also broken on
- Windows can be moved with the keyboard
- Windows can be moved with the mouse
- Windows swap with the keyboard (test with different size windows)
- Windows can be resized with the keyboard
- Windows can be resized with the mouse
- Windows can be half-tiled left and right with
Ctrl``Super``left/right- Also broken on
master_noble.
- Also broken on
Displays
- Windows move across displays in adjustment mode with directions keys
- Windows move across displays with the mouse
Miscellaneous
- Close all windows-- no icons should be active in the GNOME launcher.
- Open a window, enable tiling, stack the window, move to a different workspace, and disable tiling. The window should not become visible on the empty workspace.
- With tiling still disabled, minimize the single window. The active hint should go away.
- Maximize a window, then open another app with the Activities overview. The newly-opened app should be visible and focused.
- Maximize a window, then open another app with the launcher. The newly-opened app should be visible and focused.
See #1752
This PR adds the option to limit the maximum width of tiled windows. It is especially useful on ultrawide monitors.
The user can define the width in the extension settings. If a window exceeds the specified maximum width, it will be reduced to the max size and centered within the allotted space.