Implement maximize-to-edges (true Wayland maximize)
Browse files at this commite1fad994da9565b43c7fb139cb2fb7bf404cc320Parent: e5d4e7c251 changed files +4858 -280
- niri-config/src/binds.rs +7 -0
- niri-config/src/lib.rs +1 -0
- niri-config/src/window_rule.rs +2 -0
- niri-ipc/src/lib.rs +8 -0
- niri-visual-tests/src/cases/layout.rs +3 -3
- niri-visual-tests/src/cases/window.rs +5 -5
- niri-visual-tests/src/test_window.rs +9 -9
- src/handlers/compositor.rs +64 -27
- src/handlers/mod.rs +14 -0
- src/handlers/xdg_shell.rs +222 -12
- src/input/mod.rs +17 -0
- src/layout/floating.rs +8 -5
- src/layout/mod.rs +64 -9
- src/layout/scrolling.rs +278 -85
- src/layout/tests.rs +142 -21
- src/layout/tile.rs +124 -47
- src/layout/workspace.rs +106 -25
- src/niri.rs +7 -6
- src/protocols/foreign_toplevel.rs +6 -2
- src/tests/client.rs +8 -0
- src/tests/floating.rs +279 -0
- src/tests/fullscreen.rs +41 -1
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN-wmA.snap +18 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN-wmAU.snap +15 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN-wmB.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN-wmBU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU-wmA.snap +15 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU-wmAU.snap +12 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU-wmB.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU-wmBU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN-wmA.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN-wmAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN-wmB.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN-wmBU.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU-wmA.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU-wmAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU-wmB.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU-wmBU.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wmA.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wmAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wmB.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wmBU.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN-wmA.snap +18 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN-wmAU.snap +15 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN-wmB.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN-wmBU.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU-wmA.snap +15 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU-wmAU.snap +12 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU-wmB.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU-wmBU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN-wmA.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN-wmAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN-wmB.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN-wmBU.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU-wmA.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU-wmAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU-wmB.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU-wmBU.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wmA.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wmAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wmB.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wmBU.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN-wmA.snap +18 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN-wmAU.snap +15 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN-wmB.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN-wmBU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU-wmA.snap +15 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU-wmAU.snap +12 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU-wmB.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU-wmBU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN-wmA.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN-wmAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN-wmB.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN-wmBU.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU-wmA.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU-wmAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU-wmB.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU-wmBU.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wmA.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wmAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wmB.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wmBU.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN-wmA.snap +18 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN-wmAU.snap +15 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN-wmB.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN-wmBU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU-wmA.snap +15 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU-wmAU.snap +12 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU-wmB.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU-wmBU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN-wmA.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN-wmAU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN-wmB.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN-wmBU.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU-wmA.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU-wmAU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU-wmB.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU-wmBU.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wmA.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wmAU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wmB.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wmBU.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN-wmA.snap +18 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN-wmAU.snap +15 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN-wmB.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN-wmBU.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU-wmA.snap +15 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU-wmAU.snap +12 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU-wmB.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU-wmBU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN-wmA.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN-wmAU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN-wmB.snap +16 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN-wmBU.snap +16 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN.snap +16 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU-wmA.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU-wmAU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU-wmB.snap +16 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU-wmBU.snap +16 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU.snap +16 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wmA.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wmAU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wmB.snap +16 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wmBU.snap +16 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT.snap +16 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN-wmA.snap +18 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN-wmAU.snap +15 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN-wmB.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN-wmBU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU-wmA.snap +15 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU-wmAU.snap +12 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU-wmB.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU-wmBU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN-wmA.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN-wmAU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN-wmB.snap +16 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN-wmBU.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU-wmA.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU-wmAU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU-wmB.snap +16 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU-wmBU.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wmA.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wmAU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wmB.snap +16 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wmBU.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN-wmA.snap +18 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN-wmAU.snap +15 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN-wmB.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN-wmBU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU-wmA.snap +15 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU-wmAU.snap +12 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU-wmB.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU-wmBU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN-wmA.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN-wmAU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN-wmB.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN-wmBU.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU-wmA.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU-wmAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU-wmB.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU-wmBU.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wmA.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wmAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wmB.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wmBU.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN-wmA.snap +18 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN-wmAU.snap +15 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN-wmB.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN-wmBU.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU-wmA.snap +15 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU-wmAU.snap +12 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU-wmB.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU-wmBU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN-wmA.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN-wmAU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN-wmB.snap +16 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN-wmBU.snap +16 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN.snap +16 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU-wmA.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU-wmAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU-wmB.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU-wmBU.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wmA.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wmAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wmB.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wmBU.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN-wmA.snap +18 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN-wmAU.snap +15 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN-wmB.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN-wmBU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU-wmA.snap +15 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU-wmAU.snap +12 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU-wmB.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU-wmBU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN-wmA.snap +17 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN-wmAU.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN-wmB.snap +16 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN-wmBU.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU-wmA.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU-wmAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU-wmB.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU-wmBU.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU.snap +10 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wmA.snap +14 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wmAU.snap +11 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wmB.snap +13 -0
- src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wmBU.snap +10 -0
- src/tests/window_opening.rs +230 -3
- src/window/mapped.rs +134 -20
- src/window/mod.rs +8 -0
- src/window/unmapped.rs +11 -0
niri-config/src/binds.rsmodified+7 -0
| @@ -303,6 +303,9 @@ pub enum Action { | |||
| 303 | #[knuffel(skip)] | 303 | #[knuffel(skip)] |
| 304 | SwitchPresetWindowHeightBackById(u64), | 304 | SwitchPresetWindowHeightBackById(u64), |
| 305 | MaximizeColumn, | 305 | MaximizeColumn, |
| 306 | + MaximizeWindowToEdges, | ||
| 307 | + #[knuffel(skip)] | ||
| 308 | + MaximizeWindowToEdgesById(u64), | ||
| 306 | SetColumnWidth(#[knuffel(argument, str)] SizeChange), | 309 | SetColumnWidth(#[knuffel(argument, str)] SizeChange), |
| 307 | ExpandColumnToAvailableWidth, | 310 | ExpandColumnToAvailableWidth, |
| 308 | SwitchLayout(#[knuffel(argument, str)] LayoutSwitchTarget), | 311 | SwitchLayout(#[knuffel(argument, str)] LayoutSwitchTarget), |
| @@ -568,6 +571,10 @@ impl From<niri_ipc::Action> for Action { | |||
| 568 | Self::SwitchPresetWindowHeightBackById(id) | 571 | Self::SwitchPresetWindowHeightBackById(id) |
| 569 | } | 572 | } |
| 570 | niri_ipc::Action::MaximizeColumn {} => Self::MaximizeColumn, | 573 | niri_ipc::Action::MaximizeColumn {} => Self::MaximizeColumn, |
| 574 | + niri_ipc::Action::MaximizeWindowToEdges { id: None } => Self::MaximizeWindowToEdges, | ||
| 575 | + niri_ipc::Action::MaximizeWindowToEdges { id: Some(id) } => { | ||
| 576 | + Self::MaximizeWindowToEdgesById(id) | ||
| 577 | + } | ||
| 571 | niri_ipc::Action::SetColumnWidth { change } => Self::SetColumnWidth(change), | 578 | niri_ipc::Action::SetColumnWidth { change } => Self::SetColumnWidth(change), |
| 572 | niri_ipc::Action::ExpandColumnToAvailableWidth {} => Self::ExpandColumnToAvailableWidth, | 579 | niri_ipc::Action::ExpandColumnToAvailableWidth {} => Self::ExpandColumnToAvailableWidth, |
| 573 | niri_ipc::Action::SwitchLayout { layout } => Self::SwitchLayout(layout), | 580 | niri_ipc::Action::SwitchLayout { layout } => Self::SwitchLayout(layout), |
niri-config/src/lib.rsmodified+1 -0
| @@ -1578,6 +1578,7 @@ mod tests { | |||
| 1578 | open_maximized: Some( | 1578 | open_maximized: Some( |
| 1579 | true, | 1579 | true, |
| 1580 | ), | 1580 | ), |
| 1581 | + open_maximized_to_edges: None, | ||
| 1581 | open_fullscreen: Some( | 1582 | open_fullscreen: Some( |
| 1582 | false, | 1583 | false, |
| 1583 | ), | 1584 | ), |
niri-config/src/window_rule.rsmodified+2 -0
| @@ -24,6 +24,8 @@ pub struct WindowRule { | |||
| 24 | #[knuffel(child, unwrap(argument))] | 24 | #[knuffel(child, unwrap(argument))] |
| 25 | pub open_maximized: Option<bool>, | 25 | pub open_maximized: Option<bool>, |
| 26 | #[knuffel(child, unwrap(argument))] | 26 | #[knuffel(child, unwrap(argument))] |
| 27 | + pub open_maximized_to_edges: Option<bool>, | ||
| 28 | + #[knuffel(child, unwrap(argument))] | ||
| 27 | pub open_fullscreen: Option<bool>, | 29 | pub open_fullscreen: Option<bool>, |
| 28 | #[knuffel(child, unwrap(argument))] | 30 | #[knuffel(child, unwrap(argument))] |
| 29 | pub open_floating: Option<bool>, | 31 | pub open_floating: Option<bool>, |
niri-ipc/src/lib.rsmodified+8 -0
| @@ -713,6 +713,14 @@ pub enum Action { | |||
| 713 | }, | 713 | }, |
| 714 | /// Toggle the maximized state of the focused column. | 714 | /// Toggle the maximized state of the focused column. |
| 715 | MaximizeColumn {}, | 715 | MaximizeColumn {}, |
| 716 | + /// Toggle the maximized-to-edges state of the focused window. | ||
| 717 | + MaximizeWindowToEdges { | ||
| 718 | + /// Id of the window to maximize. | ||
| 719 | + /// | ||
| 720 | + /// If `None`, uses the focused window. | ||
| 721 | + #[cfg_attr(feature = "clap", arg(long))] | ||
| 722 | + id: Option<u64>, | ||
| 723 | + }, | ||
| 716 | /// Change the width of the focused column. | 724 | /// Change the width of the focused column. |
| 717 | SetColumnWidth { | 725 | SetColumnWidth { |
| 718 | /// How to change the width. | 726 | /// How to change the width. |
niri-visual-tests/src/cases/layout.rsmodified+3 -3
| @@ -2,7 +2,7 @@ use std::collections::HashMap; | |||
| 2 | use std::time::Duration; | 2 | use std::time::Duration; |
| 3 | 3 | ||
| 4 | use niri::animation::Clock; | 4 | use niri::animation::Clock; |
| 5 | -use niri::layout::{ActivateWindow, AddWindowTarget, LayoutElement as _, Options}; | 5 | +use niri::layout::{ActivateWindow, AddWindowTarget, LayoutElement as _, Options, SizingMode}; |
| 6 | use niri::render_helpers::RenderTarget; | 6 | use niri::render_helpers::RenderTarget; |
| 7 | use niri_config::{Color, OutputName, PresetSize}; | 7 | use niri_config::{Color, OutputName, PresetSize}; |
| 8 | use smithay::backend::renderer::element::RenderElement; | 8 | use smithay::backend::renderer::element::RenderElement; |
| @@ -168,7 +168,7 @@ impl Layout { | |||
| 168 | let max_size = window.max_size(); | 168 | let max_size = window.max_size(); |
| 169 | window.request_size( | 169 | window.request_size( |
| 170 | ws.new_window_size(width, None, false, window.rules(), (min_size, max_size)), | 170 | ws.new_window_size(width, None, false, window.rules(), (min_size, max_size)), |
| 171 | - false, | 171 | + SizingMode::Normal, |
| 172 | false, | 172 | false, |
| 173 | None, | 173 | None, |
| 174 | ); | 174 | ); |
| @@ -197,7 +197,7 @@ impl Layout { | |||
| 197 | let max_size = window.max_size(); | 197 | let max_size = window.max_size(); |
| 198 | window.request_size( | 198 | window.request_size( |
| 199 | ws.new_window_size(width, None, false, window.rules(), (min_size, max_size)), | 199 | ws.new_window_size(width, None, false, window.rules(), (min_size, max_size)), |
| 200 | - false, | 200 | + SizingMode::Normal, |
| 201 | false, | 201 | false, |
| 202 | None, | 202 | None, |
| 203 | ); | 203 | ); |
niri-visual-tests/src/cases/window.rsmodified+5 -5
| @@ -1,4 +1,4 @@ | |||
| 1 | -use niri::layout::LayoutElement; | 1 | +use niri::layout::{LayoutElement, SizingMode}; |
| 2 | use niri::render_helpers::RenderTarget; | 2 | use niri::render_helpers::RenderTarget; |
| 3 | use smithay::backend::renderer::element::RenderElement; | 3 | use smithay::backend::renderer::element::RenderElement; |
| 4 | use smithay::backend::renderer::gles::GlesRenderer; | 4 | use smithay::backend::renderer::gles::GlesRenderer; |
| @@ -14,14 +14,14 @@ pub struct Window { | |||
| 14 | impl Window { | 14 | impl Window { |
| 15 | pub fn freeform(args: Args) -> Self { | 15 | pub fn freeform(args: Args) -> Self { |
| 16 | let mut window = TestWindow::freeform(0); | 16 | let mut window = TestWindow::freeform(0); |
| 17 | - window.request_size(args.size, false, false, None); | 17 | + window.request_size(args.size, SizingMode::Normal, false, None); |
| 18 | window.communicate(); | 18 | window.communicate(); |
| 19 | Self { window } | 19 | Self { window } |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | pub fn fixed_size(args: Args) -> Self { | 22 | pub fn fixed_size(args: Args) -> Self { |
| 23 | let mut window = TestWindow::fixed_size(0); | 23 | let mut window = TestWindow::fixed_size(0); |
| 24 | - window.request_size(args.size, false, false, None); | 24 | + window.request_size(args.size, SizingMode::Normal, false, None); |
| 25 | window.communicate(); | 25 | window.communicate(); |
| 26 | Self { window } | 26 | Self { window } |
| 27 | } | 27 | } |
| @@ -29,7 +29,7 @@ impl Window { | |||
| 29 | pub fn fixed_size_with_csd_shadow(args: Args) -> Self { | 29 | pub fn fixed_size_with_csd_shadow(args: Args) -> Self { |
| 30 | let mut window = TestWindow::fixed_size(0); | 30 | let mut window = TestWindow::fixed_size(0); |
| 31 | window.set_csd_shadow_width(64); | 31 | window.set_csd_shadow_width(64); |
| 32 | - window.request_size(args.size, false, false, None); | 32 | + window.request_size(args.size, SizingMode::Normal, false, None); |
| 33 | window.communicate(); | 33 | window.communicate(); |
| 34 | Self { window } | 34 | Self { window } |
| 35 | } | 35 | } |
| @@ -38,7 +38,7 @@ impl Window { | |||
| 38 | impl TestCase for Window { | 38 | impl TestCase for Window { |
| 39 | fn resize(&mut self, width: i32, height: i32) { | 39 | fn resize(&mut self, width: i32, height: i32) { |
| 40 | self.window | 40 | self.window |
| 41 | - .request_size(Size::from((width, height)), false, false, None); | 41 | + .request_size(Size::from((width, height)), SizingMode::Normal, false, None); |
| 42 | self.window.communicate(); | 42 | self.window.communicate(); |
| 43 | } | 43 | } |
| 44 | 44 | ||
niri-visual-tests/src/test_window.rsmodified+9 -9
| @@ -4,7 +4,7 @@ use std::rc::Rc; | |||
| 4 | 4 | ||
| 5 | use niri::layout::{ | 5 | use niri::layout::{ |
| 6 | ConfigureIntent, InteractiveResizeData, LayoutElement, LayoutElementRenderElement, | 6 | ConfigureIntent, InteractiveResizeData, LayoutElement, LayoutElementRenderElement, |
| 7 | - LayoutElementRenderSnapshot, | 7 | + LayoutElementRenderSnapshot, SizingMode, |
| 8 | }; | 8 | }; |
| 9 | use niri::render_helpers::offscreen::OffscreenData; | 9 | use niri::render_helpers::offscreen::OffscreenData; |
| 10 | use niri::render_helpers::renderer::NiriRenderer; | 10 | use niri::render_helpers::renderer::NiriRenderer; |
| @@ -24,7 +24,7 @@ struct TestWindowInner { | |||
| 24 | min_size: Size<i32, Logical>, | 24 | min_size: Size<i32, Logical>, |
| 25 | max_size: Size<i32, Logical>, | 25 | max_size: Size<i32, Logical>, |
| 26 | buffer: SolidColorBuffer, | 26 | buffer: SolidColorBuffer, |
| 27 | - pending_fullscreen: bool, | 27 | + pending_sizing_mode: SizingMode, |
| 28 | csd_shadow_width: i32, | 28 | csd_shadow_width: i32, |
| 29 | csd_shadow_buffer: SolidColorBuffer, | 29 | csd_shadow_buffer: SolidColorBuffer, |
| 30 | } | 30 | } |
| @@ -50,7 +50,7 @@ impl TestWindow { | |||
| 50 | min_size, | 50 | min_size, |
| 51 | max_size, | 51 | max_size, |
| 52 | buffer, | 52 | buffer, |
| 53 | - pending_fullscreen: false, | 53 | + pending_sizing_mode: SizingMode::Normal, |
| 54 | csd_shadow_width: 0, | 54 | csd_shadow_width: 0, |
| 55 | csd_shadow_buffer: SolidColorBuffer::new((0., 0.), [0., 0., 0., 0.3]), | 55 | csd_shadow_buffer: SolidColorBuffer::new((0., 0.), [0., 0., 0., 0.3]), |
| 56 | })), | 56 | })), |
| @@ -182,12 +182,12 @@ impl LayoutElement for TestWindow { | |||
| 182 | fn request_size( | 182 | fn request_size( |
| 183 | &mut self, | 183 | &mut self, |
| 184 | size: Size<i32, Logical>, | 184 | size: Size<i32, Logical>, |
| 185 | - is_fullscreen: bool, | 185 | + mode: SizingMode, |
| 186 | _animate: bool, | 186 | _animate: bool, |
| 187 | _transaction: Option<Transaction>, | 187 | _transaction: Option<Transaction>, |
| 188 | ) { | 188 | ) { |
| 189 | self.inner.borrow_mut().requested_size = Some(size); | 189 | self.inner.borrow_mut().requested_size = Some(size); |
| 190 | - self.inner.borrow_mut().pending_fullscreen = is_fullscreen; | 190 | + self.inner.borrow_mut().pending_sizing_mode = mode; |
| 191 | } | 191 | } |
| 192 | 192 | ||
| 193 | fn min_size(&self) -> Size<i32, Logical> { | 193 | fn min_size(&self) -> Size<i32, Logical> { |
| @@ -232,12 +232,12 @@ impl LayoutElement for TestWindow { | |||
| 232 | 232 | ||
| 233 | fn send_pending_configure(&mut self) {} | 233 | fn send_pending_configure(&mut self) {} |
| 234 | 234 | ||
| 235 | - fn is_fullscreen(&self) -> bool { | 235 | + fn pending_sizing_mode(&self) -> SizingMode { |
| 236 | - false | 236 | + self.inner.borrow().pending_sizing_mode |
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | - fn is_pending_fullscreen(&self) -> bool { | 239 | + fn sizing_mode(&self) -> SizingMode { |
| 240 | - self.inner.borrow().pending_fullscreen | 240 | + SizingMode::Normal |
| 241 | } | 241 | } |
| 242 | 242 | ||
| 243 | fn requested_size(&self) -> Option<Size<i32, Logical>> { | 243 | fn requested_size(&self) -> Option<Size<i32, Logical>> { |
src/handlers/compositor.rsmodified+64 -27
| @@ -20,7 +20,7 @@ use smithay::{delegate_compositor, delegate_shm}; | |||
| 20 | 20 | ||
| 21 | use super::xdg_shell::add_mapped_toplevel_pre_commit_hook; | 21 | use super::xdg_shell::add_mapped_toplevel_pre_commit_hook; |
| 22 | use crate::handlers::XDG_ACTIVATION_TOKEN_TIMEOUT; | 22 | use crate::handlers::XDG_ACTIVATION_TOKEN_TIMEOUT; |
| 23 | -use crate::layout::{ActivateWindow, AddWindowTarget}; | 23 | +use crate::layout::{ActivateWindow, AddWindowTarget, LayoutElement as _}; |
| 24 | use crate::niri::{CastTarget, ClientState, LockState, State}; | 24 | use crate::niri::{CastTarget, ClientState, LockState, State}; |
| 25 | use crate::utils::transaction::Transaction; | 25 | use crate::utils::transaction::Transaction; |
| 26 | use crate::utils::{is_mapped, send_scale_transform}; | 26 | use crate::utils::{is_mapped, send_scale_transform}; |
| @@ -91,35 +91,59 @@ impl CompositorHandler for State { | |||
| 91 | 91 | ||
| 92 | let toplevel = window.toplevel().expect("no X11 support"); | 92 | let toplevel = window.toplevel().expect("no X11 support"); |
| 93 | 93 | ||
| 94 | - let (rules, width, height, is_full_width, output, workspace_id) = | 94 | + let ( |
| 95 | - if let InitialConfigureState::Configured { | 95 | + rules, |
| 96 | + width, | ||
| 97 | + height, | ||
| 98 | + is_full_width, | ||
| 99 | + output, | ||
| 100 | + workspace_id, | ||
| 101 | + is_pending_maximized, | ||
| 102 | + ) = if let InitialConfigureState::Configured { | ||
| 103 | + rules, | ||
| 104 | + width, | ||
| 105 | + height, | ||
| 106 | + floating_width: _, | ||
| 107 | + floating_height: _, | ||
| 108 | + is_full_width, | ||
| 109 | + output, | ||
| 110 | + workspace_name, | ||
| 111 | + is_pending_maximized, | ||
| 112 | + } = state | ||
| 113 | + { | ||
| 114 | + // Check that the output is still connected. | ||
| 115 | + let output = | ||
| 116 | + output.filter(|o| self.niri.layout.monitor_for_output(o).is_some()); | ||
| 117 | + | ||
| 118 | + // Check that the workspace still exists. | ||
| 119 | + let workspace_id = workspace_name | ||
| 120 | + .as_deref() | ||
| 121 | + .and_then(|n| self.niri.layout.find_workspace_by_name(n)) | ||
| 122 | + .map(|(_, ws)| ws.id()); | ||
| 123 | + | ||
| 124 | + ( | ||
| 96 | rules, | 125 | rules, |
| 97 | width, | 126 | width, |
| 98 | height, | 127 | height, |
| 99 | - floating_width: _, | ||
| 100 | - floating_height: _, | ||
| 101 | is_full_width, | 128 | is_full_width, |
| 102 | output, | 129 | output, |
| 103 | - workspace_name, | 130 | + workspace_id, |
| 104 | - } = state | 131 | + is_pending_maximized, |
| 105 | - { | 132 | + ) |
| 106 | - // Check that the output is still connected. | 133 | + } else { |
| 107 | - let output = | 134 | + // Can happen when a surface unmaps by attaching a null buffer while |
| 108 | - output.filter(|o| self.niri.layout.monitor_for_output(o).is_some()); | 135 | + // there are in-flight pending configures. |
| 109 | - | 136 | + debug!("window mapped without proper initial configure"); |
| 110 | - // Check that the workspace still exists. | 137 | + ( |
| 111 | - let workspace_id = workspace_name | 138 | + ResolvedWindowRules::empty(), |
| 112 | - .as_deref() | 139 | + None, |
| 113 | - .and_then(|n| self.niri.layout.find_workspace_by_name(n)) | 140 | + None, |
| 114 | - .map(|(_, ws)| ws.id()); | 141 | + false, |
| 115 | - | 142 | + None, |
| 116 | - (rules, width, height, is_full_width, output, workspace_id) | 143 | + None, |
| 117 | - } else { | 144 | + false, |
| 118 | - // Can happen when a surface unmaps by attaching a null buffer while | 145 | + ) |
| 119 | - // there are in-flight pending configures. | 146 | + }; |
| 120 | - debug!("window mapped without proper initial configure"); | ||
| 121 | - (ResolvedWindowRules::empty(), None, None, false, None, None) | ||
| 122 | - }; | ||
| 123 | 147 | ||
| 124 | // The GTK about dialog sets min/max size after the initial configure but | 148 | // The GTK about dialog sets min/max size after the initial configure but |
| 125 | // before mapping, so we need to compute open_floating at the last possible | 149 | // before mapping, so we need to compute open_floating at the last possible |
| @@ -169,7 +193,7 @@ impl CompositorHandler for State { | |||
| 169 | .map(|(mapped, _)| mapped.window.clone()); | 193 | .map(|(mapped, _)| mapped.window.clone()); |
| 170 | 194 | ||
| 171 | // The mapped pre-commit hook deals with dma-bufs on its own. | 195 | // The mapped pre-commit hook deals with dma-bufs on its own. |
| 172 | - self.remove_default_dmabuf_pre_commit_hook(toplevel.wl_surface()); | 196 | + self.remove_default_dmabuf_pre_commit_hook(surface); |
| 173 | let hook = add_mapped_toplevel_pre_commit_hook(toplevel); | 197 | let hook = add_mapped_toplevel_pre_commit_hook(toplevel); |
| 174 | let mapped = Mapped::new(window, rules, hook); | 198 | let mapped = Mapped::new(window, rules, hook); |
| 175 | let window = mapped.window.clone(); | 199 | let window = mapped.window.clone(); |
| @@ -193,8 +217,21 @@ impl CompositorHandler for State { | |||
| 193 | is_floating, | 217 | is_floating, |
| 194 | activate, | 218 | activate, |
| 195 | ); | 219 | ); |
| 220 | + let output = output.cloned(); | ||
| 221 | + | ||
| 222 | + // The window state cannot contain Fullscreen and Maximized at once. Therefore, | ||
| 223 | + // if the window ended up fullscreen, then we only know that it is also | ||
| 224 | + // maximized from the is_pending_maximized variable. Tell the layout about it | ||
| 225 | + // here so that unfullscreening the window makes it maximized. | ||
| 226 | + if let Some((mapped, _)) = self.niri.layout.find_window_and_output(surface) { | ||
| 227 | + if mapped.pending_sizing_mode().is_fullscreen() && is_pending_maximized { | ||
| 228 | + self.niri.layout.set_maximized(&window, true); | ||
| 229 | + } | ||
| 230 | + } else { | ||
| 231 | + error!("layout is missing the window that we just added"); | ||
| 232 | + } | ||
| 196 | 233 | ||
| 197 | - if let Some(output) = output.cloned() { | 234 | + if let Some(output) = output { |
| 198 | self.niri.layout.start_open_animation_for_window(&window); | 235 | self.niri.layout.start_open_animation_for_window(&window); |
| 199 | 236 | ||
| 200 | let new_focus = self.niri.layout.focus().map(|m| &m.window); | 237 | let new_focus = self.niri.layout.focus().map(|m| &m.window); |
src/handlers/mod.rsmodified+14 -0
| @@ -550,6 +550,20 @@ impl ForeignToplevelHandler for State { | |||
| 550 | self.niri.layout.set_fullscreen(&window, false); | 550 | self.niri.layout.set_fullscreen(&window, false); |
| 551 | } | 551 | } |
| 552 | } | 552 | } |
| 553 | + | ||
| 554 | + fn set_maximized(&mut self, wl_surface: WlSurface) { | ||
| 555 | + if let Some((mapped, _)) = self.niri.layout.find_window_and_output(&wl_surface) { | ||
| 556 | + let window = mapped.window.clone(); | ||
| 557 | + self.niri.layout.set_maximized(&window, true); | ||
| 558 | + } | ||
| 559 | + } | ||
| 560 | + | ||
| 561 | + fn unset_maximized(&mut self, wl_surface: WlSurface) { | ||
| 562 | + if let Some((mapped, _)) = self.niri.layout.find_window_and_output(&wl_surface) { | ||
| 563 | + let window = mapped.window.clone(); | ||
| 564 | + self.niri.layout.set_maximized(&window, false); | ||
| 565 | + } | ||
| 566 | + } | ||
| 553 | } | 567 | } |
| 554 | delegate_foreign_toplevel!(State); | 568 | delegate_foreign_toplevel!(State); |
| 555 | 569 | ||
src/handlers/xdg_shell.rsmodified+222 -12
| @@ -428,18 +428,205 @@ impl XdgShellHandler for State { | |||
| 428 | }); | 428 | }); |
| 429 | } | 429 | } |
| 430 | 430 | ||
| 431 | - fn maximize_request(&mut self, surface: ToplevelSurface) { | 431 | + fn maximize_request(&mut self, toplevel: ToplevelSurface) { |
| 432 | - // FIXME | 432 | + if let Some((mapped, _)) = self |
| 433 | + .niri | ||
| 434 | + .layout | ||
| 435 | + .find_window_and_output_mut(toplevel.wl_surface()) | ||
| 436 | + { | ||
| 437 | + // A configure is required in response to this event regardless if there are pending | ||
| 438 | + // changes. | ||
| 439 | + mapped.set_needs_configure(); | ||
| 433 | 440 | ||
| 434 | - // A configure is required in response to this event. However, if an initial configure | 441 | + let window = mapped.window.clone(); |
| 435 | - // wasn't sent, then we will send this as part of the initial configure later. | 442 | + self.niri.layout.set_maximized(&window, true); |
| 436 | - if surface.is_initial_configure_sent() { | 443 | + } else if let Some(unmapped) = self.niri.unmapped_windows.get_mut(toplevel.wl_surface()) { |
| 437 | - surface.send_configure(); | 444 | + match &mut unmapped.state { |
| 445 | + InitialConfigureState::NotConfigured { | ||
| 446 | + wants_maximized, .. | ||
| 447 | + } => { | ||
| 448 | + *wants_maximized = true; | ||
| 449 | + | ||
| 450 | + // The required configure will be the initial configure. | ||
| 451 | + } | ||
| 452 | + InitialConfigureState::Configured { | ||
| 453 | + rules, | ||
| 454 | + output, | ||
| 455 | + is_pending_maximized, | ||
| 456 | + .. | ||
| 457 | + } => { | ||
| 458 | + // Figure out the monitor following a similar logic to initial configure. | ||
| 459 | + // FIXME: deduplicate. | ||
| 460 | + let mon = output | ||
| 461 | + .as_ref() | ||
| 462 | + .and_then(|o| self.niri.layout.monitor_for_output(o)) | ||
| 463 | + .map(|mon| (mon, false)) | ||
| 464 | + // If not, check if we have a parent with a monitor. | ||
| 465 | + .or_else(|| { | ||
| 466 | + toplevel | ||
| 467 | + .parent() | ||
| 468 | + .and_then(|parent| self.niri.layout.find_window_and_output(&parent)) | ||
| 469 | + .and_then(|(_win, output)| output) | ||
| 470 | + .and_then(|o| self.niri.layout.monitor_for_output(o)) | ||
| 471 | + .map(|mon| (mon, true)) | ||
| 472 | + }) | ||
| 473 | + // If not, fall back to the active monitor. | ||
| 474 | + .or_else(|| { | ||
| 475 | + self.niri | ||
| 476 | + .layout | ||
| 477 | + .active_monitor_ref() | ||
| 478 | + .map(|mon| (mon, false)) | ||
| 479 | + }); | ||
| 480 | + | ||
| 481 | + *output = mon | ||
| 482 | + .filter(|(_, parent)| !parent) | ||
| 483 | + .map(|(mon, _)| mon.output().clone()); | ||
| 484 | + let mon = mon.map(|(mon, _)| mon); | ||
| 485 | + | ||
| 486 | + let ws = mon | ||
| 487 | + .map(|mon| mon.active_workspace_ref()) | ||
| 488 | + .or_else(|| self.niri.layout.active_workspace()); | ||
| 489 | + | ||
| 490 | + if let Some(ws) = ws { | ||
| 491 | + // If the window is pending fullscreen, then this will do nothing. But | ||
| 492 | + // that's expected: the window remains fullscreen, and we simply remember | ||
| 493 | + // that it is now pending maximized. | ||
| 494 | + *is_pending_maximized = true; | ||
| 495 | + toplevel.with_pending_state(|state| { | ||
| 496 | + if !state.states.contains(xdg_toplevel::State::Fullscreen) { | ||
| 497 | + state.states.set(xdg_toplevel::State::Maximized); | ||
| 498 | + } | ||
| 499 | + }); | ||
| 500 | + ws.configure_new_window(&unmapped.window, None, None, false, rules); | ||
| 501 | + } | ||
| 502 | + | ||
| 503 | + // We already sent the initial configure, so we need to reconfigure. | ||
| 504 | + toplevel.send_configure(); | ||
| 505 | + } | ||
| 506 | + } | ||
| 507 | + } else { | ||
| 508 | + error!("couldn't find the toplevel in maximize_request()"); | ||
| 509 | + toplevel.send_configure(); | ||
| 438 | } | 510 | } |
| 439 | } | 511 | } |
| 440 | 512 | ||
| 441 | - fn unmaximize_request(&mut self, _surface: ToplevelSurface) { | 513 | + fn unmaximize_request(&mut self, toplevel: ToplevelSurface) { |
| 442 | - // FIXME | 514 | + if let Some((mapped, _)) = self |
| 515 | + .niri | ||
| 516 | + .layout | ||
| 517 | + .find_window_and_output_mut(toplevel.wl_surface()) | ||
| 518 | + { | ||
| 519 | + // A configure is required in response to this event regardless if there are pending | ||
| 520 | + // changes. | ||
| 521 | + mapped.set_needs_configure(); | ||
| 522 | + | ||
| 523 | + let window = mapped.window.clone(); | ||
| 524 | + self.niri.layout.set_maximized(&window, false); | ||
| 525 | + } else if let Some(unmapped) = self.niri.unmapped_windows.get_mut(toplevel.wl_surface()) { | ||
| 526 | + match &mut unmapped.state { | ||
| 527 | + InitialConfigureState::NotConfigured { | ||
| 528 | + wants_maximized, .. | ||
| 529 | + } => { | ||
| 530 | + *wants_maximized = false; | ||
| 531 | + | ||
| 532 | + // The required configure will be the initial configure. | ||
| 533 | + } | ||
| 534 | + InitialConfigureState::Configured { | ||
| 535 | + rules, | ||
| 536 | + width, | ||
| 537 | + height, | ||
| 538 | + floating_width, | ||
| 539 | + floating_height, | ||
| 540 | + is_full_width, | ||
| 541 | + output, | ||
| 542 | + workspace_name, | ||
| 543 | + is_pending_maximized, | ||
| 544 | + } => { | ||
| 545 | + // Figure out the monitor following a similar logic to initial configure. | ||
| 546 | + // FIXME: deduplicate. | ||
| 547 | + let mon = workspace_name | ||
| 548 | + .as_deref() | ||
| 549 | + .and_then(|name| self.niri.layout.monitor_for_workspace(name)) | ||
| 550 | + .map(|mon| (mon, false)); | ||
| 551 | + | ||
| 552 | + let mon = mon.or_else(|| { | ||
| 553 | + output | ||
| 554 | + .as_ref() | ||
| 555 | + .and_then(|o| self.niri.layout.monitor_for_output(o)) | ||
| 556 | + .map(|mon| (mon, false)) | ||
| 557 | + // If not, check if we have a parent with a monitor. | ||
| 558 | + .or_else(|| { | ||
| 559 | + toplevel | ||
| 560 | + .parent() | ||
| 561 | + .and_then(|parent| { | ||
| 562 | + self.niri.layout.find_window_and_output(&parent) | ||
| 563 | + }) | ||
| 564 | + .and_then(|(_win, output)| output) | ||
| 565 | + .and_then(|o| self.niri.layout.monitor_for_output(o)) | ||
| 566 | + .map(|mon| (mon, true)) | ||
| 567 | + }) | ||
| 568 | + // If not, fall back to the active monitor. | ||
| 569 | + .or_else(|| { | ||
| 570 | + self.niri | ||
| 571 | + .layout | ||
| 572 | + .active_monitor_ref() | ||
| 573 | + .map(|mon| (mon, false)) | ||
| 574 | + }) | ||
| 575 | + }); | ||
| 576 | + | ||
| 577 | + *output = mon | ||
| 578 | + .filter(|(_, parent)| !parent) | ||
| 579 | + .map(|(mon, _)| mon.output().clone()); | ||
| 580 | + let mon = mon.map(|(mon, _)| mon); | ||
| 581 | + | ||
| 582 | + let ws = workspace_name | ||
| 583 | + .as_deref() | ||
| 584 | + .and_then(|name| mon.map(|mon| mon.find_named_workspace(name))) | ||
| 585 | + .unwrap_or_else(|| { | ||
| 586 | + mon.map(|mon| mon.active_workspace_ref()) | ||
| 587 | + .or_else(|| self.niri.layout.active_workspace()) | ||
| 588 | + }); | ||
| 589 | + | ||
| 590 | + if let Some(ws) = ws { | ||
| 591 | + // If the window is pending fullscreen, then this will do nothing since | ||
| 592 | + // then the Maximized state is already unset. But that's expected: the | ||
| 593 | + // window remains fullscreen, and we simply remember that it is no | ||
| 594 | + // longer pending maximized. | ||
| 595 | + *is_pending_maximized = false; | ||
| 596 | + toplevel.with_pending_state(|state| { | ||
| 597 | + state.states.unset(xdg_toplevel::State::Maximized); | ||
| 598 | + }); | ||
| 599 | + | ||
| 600 | + let is_floating = rules.compute_open_floating(&toplevel); | ||
| 601 | + let configure_width = if is_floating { | ||
| 602 | + *floating_width | ||
| 603 | + } else if *is_full_width { | ||
| 604 | + Some(PresetSize::Proportion(1.)) | ||
| 605 | + } else { | ||
| 606 | + *width | ||
| 607 | + }; | ||
| 608 | + let configure_height = if is_floating { | ||
| 609 | + *floating_height | ||
| 610 | + } else { | ||
| 611 | + *height | ||
| 612 | + }; | ||
| 613 | + ws.configure_new_window( | ||
| 614 | + &unmapped.window, | ||
| 615 | + configure_width, | ||
| 616 | + configure_height, | ||
| 617 | + is_floating, | ||
| 618 | + rules, | ||
| 619 | + ); | ||
| 620 | + } | ||
| 621 | + | ||
| 622 | + // We already sent the initial configure, so we need to reconfigure. | ||
| 623 | + toplevel.send_configure(); | ||
| 624 | + } | ||
| 625 | + } | ||
| 626 | + } else { | ||
| 627 | + error!("couldn't find the toplevel in unmaximize_request()"); | ||
| 628 | + toplevel.send_configure(); | ||
| 629 | + } | ||
| 443 | } | 630 | } |
| 444 | 631 | ||
| 445 | fn fullscreen_request( | 632 | fn fullscreen_request( |
| @@ -474,7 +661,9 @@ impl XdgShellHandler for State { | |||
| 474 | self.niri.layout.set_fullscreen(&window, true); | 661 | self.niri.layout.set_fullscreen(&window, true); |
| 475 | } else if let Some(unmapped) = self.niri.unmapped_windows.get_mut(toplevel.wl_surface()) { | 662 | } else if let Some(unmapped) = self.niri.unmapped_windows.get_mut(toplevel.wl_surface()) { |
| 476 | match &mut unmapped.state { | 663 | match &mut unmapped.state { |
| 477 | - InitialConfigureState::NotConfigured { wants_fullscreen } => { | 664 | + InitialConfigureState::NotConfigured { |
| 665 | + wants_fullscreen, .. | ||
| 666 | + } => { | ||
| 478 | *wants_fullscreen = Some(requested_output); | 667 | *wants_fullscreen = Some(requested_output); |
| 479 | 668 | ||
| 480 | // The required configure will be the initial configure. | 669 | // The required configure will be the initial configure. |
| @@ -517,6 +706,7 @@ impl XdgShellHandler for State { | |||
| 517 | if let Some(ws) = ws { | 706 | if let Some(ws) = ws { |
| 518 | toplevel.with_pending_state(|state| { | 707 | toplevel.with_pending_state(|state| { |
| 519 | state.states.set(xdg_toplevel::State::Fullscreen); | 708 | state.states.set(xdg_toplevel::State::Fullscreen); |
| 709 | + state.states.unset(xdg_toplevel::State::Maximized); | ||
| 520 | }); | 710 | }); |
| 521 | ws.configure_new_window(&unmapped.window, None, None, false, rules); | 711 | ws.configure_new_window(&unmapped.window, None, None, false, rules); |
| 522 | } | 712 | } |
| @@ -545,7 +735,9 @@ impl XdgShellHandler for State { | |||
| 545 | self.niri.layout.set_fullscreen(&window, false); | 735 | self.niri.layout.set_fullscreen(&window, false); |
| 546 | } else if let Some(unmapped) = self.niri.unmapped_windows.get_mut(toplevel.wl_surface()) { | 736 | } else if let Some(unmapped) = self.niri.unmapped_windows.get_mut(toplevel.wl_surface()) { |
| 547 | match &mut unmapped.state { | 737 | match &mut unmapped.state { |
| 548 | - InitialConfigureState::NotConfigured { wants_fullscreen } => { | 738 | + InitialConfigureState::NotConfigured { |
| 739 | + wants_fullscreen, .. | ||
| 740 | + } => { | ||
| 549 | *wants_fullscreen = None; | 741 | *wants_fullscreen = None; |
| 550 | 742 | ||
| 551 | // The required configure will be the initial configure. | 743 | // The required configure will be the initial configure. |
| @@ -559,6 +751,7 @@ impl XdgShellHandler for State { | |||
| 559 | is_full_width, | 751 | is_full_width, |
| 560 | output, | 752 | output, |
| 561 | workspace_name, | 753 | workspace_name, |
| 754 | + is_pending_maximized, | ||
| 562 | } => { | 755 | } => { |
| 563 | // Figure out the monitor following a similar logic to initial configure. | 756 | // Figure out the monitor following a similar logic to initial configure. |
| 564 | // FIXME: deduplicate. | 757 | // FIXME: deduplicate. |
| @@ -608,6 +801,10 @@ impl XdgShellHandler for State { | |||
| 608 | if let Some(ws) = ws { | 801 | if let Some(ws) = ws { |
| 609 | toplevel.with_pending_state(|state| { | 802 | toplevel.with_pending_state(|state| { |
| 610 | state.states.unset(xdg_toplevel::State::Fullscreen); | 803 | state.states.unset(xdg_toplevel::State::Fullscreen); |
| 804 | + | ||
| 805 | + if *is_pending_maximized { | ||
| 806 | + state.states.set(xdg_toplevel::State::Maximized); | ||
| 807 | + } | ||
| 611 | }); | 808 | }); |
| 612 | 809 | ||
| 613 | let is_floating = rules.compute_open_floating(&toplevel); | 810 | let is_floating = rules.compute_open_floating(&toplevel); |
| @@ -858,7 +1055,11 @@ impl State { | |||
| 858 | 1055 | ||
| 859 | let Unmapped { window, state, .. } = unmapped; | 1056 | let Unmapped { window, state, .. } = unmapped; |
| 860 | 1057 | ||
| 861 | - let InitialConfigureState::NotConfigured { wants_fullscreen } = state else { | 1058 | + let InitialConfigureState::NotConfigured { |
| 1059 | + wants_fullscreen, | ||
| 1060 | + wants_maximized, | ||
| 1061 | + } = state | ||
| 1062 | + else { | ||
| 862 | error!("window must not be already configured in send_initial_configure()"); | 1063 | error!("window must not be already configured in send_initial_configure()"); |
| 863 | return; | 1064 | return; |
| 864 | }; | 1065 | }; |
| @@ -934,14 +1135,22 @@ impl State { | |||
| 934 | .or_else(|| self.niri.layout.active_workspace()) | 1135 | .or_else(|| self.niri.layout.active_workspace()) |
| 935 | }); | 1136 | }); |
| 936 | 1137 | ||
| 1138 | + let mut is_pending_maximized = false; | ||
| 937 | if let Some(ws) = ws { | 1139 | if let Some(ws) = ws { |
| 938 | - // Set a fullscreen state based on window request and window rule. | 1140 | + // Set a fullscreen and maximized state based on window request and window rule. |
| 1141 | + is_pending_maximized = (*wants_maximized && rules.open_maximized_to_edges.is_none()) | ||
| 1142 | + || rules.open_maximized_to_edges == Some(true); | ||
| 1143 | + | ||
| 939 | if (wants_fullscreen.is_some() && rules.open_fullscreen.is_none()) | 1144 | if (wants_fullscreen.is_some() && rules.open_fullscreen.is_none()) |
| 940 | || rules.open_fullscreen == Some(true) | 1145 | || rules.open_fullscreen == Some(true) |
| 941 | { | 1146 | { |
| 942 | toplevel.with_pending_state(|state| { | 1147 | toplevel.with_pending_state(|state| { |
| 943 | state.states.set(xdg_toplevel::State::Fullscreen); | 1148 | state.states.set(xdg_toplevel::State::Fullscreen); |
| 944 | }); | 1149 | }); |
| 1150 | + } else if is_pending_maximized { | ||
| 1151 | + toplevel.with_pending_state(|state| { | ||
| 1152 | + state.states.set(xdg_toplevel::State::Maximized); | ||
| 1153 | + }); | ||
| 945 | } | 1154 | } |
| 946 | 1155 | ||
| 947 | width = ws.resolve_default_width(rules.default_width, false); | 1156 | width = ws.resolve_default_width(rules.default_width, false); |
| @@ -979,6 +1188,7 @@ impl State { | |||
| 979 | is_full_width, | 1188 | is_full_width, |
| 980 | output, | 1189 | output, |
| 981 | workspace_name: ws.and_then(|w| w.name().cloned()), | 1190 | workspace_name: ws.and_then(|w| w.name().cloned()), |
| 1191 | + is_pending_maximized, | ||
| 982 | }; | 1192 | }; |
| 983 | 1193 | ||
| 984 | trace!(surface = %toplevel.wl_surface().id(), "sending initial configure"); | 1194 | trace!(surface = %toplevel.wl_surface().id(), "sending initial configure"); |
src/input/mod.rsmodified+17 -0
| @@ -1514,6 +1514,23 @@ impl State { | |||
| 1514 | Action::MaximizeColumn => { | 1514 | Action::MaximizeColumn => { |
| 1515 | self.niri.layout.toggle_full_width(); | 1515 | self.niri.layout.toggle_full_width(); |
| 1516 | } | 1516 | } |
| 1517 | + Action::MaximizeWindowToEdges => { | ||
| 1518 | + let focus = self.niri.layout.focus().map(|m| m.window.clone()); | ||
| 1519 | + if let Some(window) = focus { | ||
| 1520 | + self.niri.layout.toggle_maximized(&window); | ||
| 1521 | + // FIXME: granular | ||
| 1522 | + self.niri.queue_redraw_all(); | ||
| 1523 | + } | ||
| 1524 | + } | ||
| 1525 | + Action::MaximizeWindowToEdgesById(id) => { | ||
| 1526 | + let window = self.niri.layout.windows().find(|(_, m)| m.id().get() == id); | ||
| 1527 | + let window = window.map(|(_, m)| m.window.clone()); | ||
| 1528 | + if let Some(window) = window { | ||
| 1529 | + self.niri.layout.toggle_maximized(&window); | ||
| 1530 | + // FIXME: granular | ||
| 1531 | + self.niri.queue_redraw_all(); | ||
| 1532 | + } | ||
| 1533 | + } | ||
| 1517 | Action::FocusMonitorLeft => { | 1534 | Action::FocusMonitorLeft => { |
| 1518 | if let Some(output) = self.niri.output_left() { | 1535 | if let Some(output) = self.niri.output_left() { |
| 1519 | self.niri.layout.focus_output(&output); | 1536 | self.niri.layout.focus_output(&output); |
src/layout/floating.rsmodified+8 -5
| @@ -413,8 +413,8 @@ impl<W: LayoutElement> FloatingSpace<W> { | |||
| 413 | // unfullscreen it. | 413 | // unfullscreen it. |
| 414 | let floating_size = tile.floating_window_size; | 414 | let floating_size = tile.floating_window_size; |
| 415 | let win = tile.window_mut(); | 415 | let win = tile.window_mut(); |
| 416 | - let mut size = if win.is_pending_fullscreen() { | 416 | + let mut size = if !win.pending_sizing_mode().is_normal() { |
| 417 | - // If the window was fullscreen without a floating size, ask for (0, 0). | 417 | + // If the window was fullscreen or maximized without a floating size, ask for (0, 0). |
| 418 | floating_size.unwrap_or_default() | 418 | floating_size.unwrap_or_default() |
| 419 | } else { | 419 | } else { |
| 420 | // If the window wasn't fullscreen without a floating size (e.g. it was tiled before), | 420 | // If the window wasn't fullscreen without a floating size (e.g. it was tiled before), |
| @@ -1312,6 +1312,8 @@ impl<W: LayoutElement> FloatingSpace<W> { | |||
| 1312 | assert_eq!(self.tiles.len(), self.data.len()); | 1312 | assert_eq!(self.tiles.len(), self.data.len()); |
| 1313 | 1313 | ||
| 1314 | for (i, (tile, data)) in zip(&self.tiles, &self.data).enumerate() { | 1314 | for (i, (tile, data)) in zip(&self.tiles, &self.data).enumerate() { |
| 1315 | + use crate::layout::SizingMode; | ||
| 1316 | + | ||
| 1315 | assert!(Rc::ptr_eq(&self.options, &tile.options)); | 1317 | assert!(Rc::ptr_eq(&self.options, &tile.options)); |
| 1316 | assert_eq!(self.view_size, tile.view_size()); | 1318 | assert_eq!(self.view_size, tile.view_size()); |
| 1317 | assert_eq!(self.clock, tile.clock); | 1319 | assert_eq!(self.clock, tile.clock); |
| @@ -1325,9 +1327,10 @@ impl<W: LayoutElement> FloatingSpace<W> { | |||
| 1325 | assert!(idx < self.options.layout.preset_window_heights.len()); | 1327 | assert!(idx < self.options.layout.preset_window_heights.len()); |
| 1326 | } | 1328 | } |
| 1327 | 1329 | ||
| 1328 | - assert!( | 1330 | + assert_eq!( |
| 1329 | - !tile.window().is_pending_fullscreen(), | 1331 | + tile.window().pending_sizing_mode(), |
| 1330 | - "floating windows cannot be fullscreen" | 1332 | + SizingMode::Normal, |
| 1333 | + "floating windows cannot be maximized or fullscreen" | ||
| 1331 | ); | 1334 | ); |
| 1332 | 1335 | ||
| 1333 | data.verify_invariants(); | 1336 | data.verify_invariants(); |
src/layout/mod.rsmodified+64 -9
| @@ -118,6 +118,13 @@ niri_render_elements! { | |||
| 118 | pub type LayoutElementRenderSnapshot = | 118 | pub type LayoutElementRenderSnapshot = |
| 119 | RenderSnapshot<BakedBuffer<TextureBuffer<GlesTexture>>, BakedBuffer<SolidColorBuffer>>; | 119 | RenderSnapshot<BakedBuffer<TextureBuffer<GlesTexture>>, BakedBuffer<SolidColorBuffer>>; |
| 120 | 120 | ||
| 121 | +#[derive(Debug, Clone, Copy, PartialEq, Eq)] | ||
| 122 | +pub enum SizingMode { | ||
| 123 | + Normal, | ||
| 124 | + Maximized, | ||
| 125 | + Fullscreen, | ||
| 126 | +} | ||
| 127 | + | ||
| 121 | pub trait LayoutElement { | 128 | pub trait LayoutElement { |
| 122 | /// Type that can be used as a unique ID of this element. | 129 | /// Type that can be used as a unique ID of this element. |
| 123 | type Id: PartialEq + std::fmt::Debug + Clone; | 130 | type Id: PartialEq + std::fmt::Debug + Clone; |
| @@ -185,14 +192,14 @@ pub trait LayoutElement { | |||
| 185 | fn request_size( | 192 | fn request_size( |
| 186 | &mut self, | 193 | &mut self, |
| 187 | size: Size<i32, Logical>, | 194 | size: Size<i32, Logical>, |
| 188 | - is_fullscreen: bool, | 195 | + mode: SizingMode, |
| 189 | animate: bool, | 196 | animate: bool, |
| 190 | transaction: Option<Transaction>, | 197 | transaction: Option<Transaction>, |
| 191 | ); | 198 | ); |
| 192 | 199 | ||
| 193 | /// Requests the element to change size once, clearing the request afterwards. | 200 | /// Requests the element to change size once, clearing the request afterwards. |
| 194 | fn request_size_once(&mut self, size: Size<i32, Logical>, animate: bool) { | 201 | fn request_size_once(&mut self, size: Size<i32, Logical>, animate: bool) { |
| 195 | - self.request_size(size, false, animate, None); | 202 | + self.request_size(size, SizingMode::Normal, animate, None); |
| 196 | } | 203 | } |
| 197 | 204 | ||
| 198 | fn min_size(&self) -> Size<i32, Logical>; | 205 | fn min_size(&self) -> Size<i32, Logical>; |
| @@ -214,15 +221,15 @@ pub trait LayoutElement { | |||
| 214 | fn configure_intent(&self) -> ConfigureIntent; | 221 | fn configure_intent(&self) -> ConfigureIntent; |
| 215 | fn send_pending_configure(&mut self); | 222 | fn send_pending_configure(&mut self); |
| 216 | 223 | ||
| 217 | - /// Whether the element is currently fullscreen. | 224 | + /// The element's current sizing mode. |
| 218 | /// | 225 | /// |
| 219 | /// This will *not* switch immediately after a [`LayoutElement::request_size()`] call. | 226 | /// This will *not* switch immediately after a [`LayoutElement::request_size()`] call. |
| 220 | - fn is_fullscreen(&self) -> bool; | 227 | + fn sizing_mode(&self) -> SizingMode; |
| 221 | 228 | ||
| 222 | - /// Whether we're requesting the element to be fullscreen. | 229 | + /// The sizing mode that we're requesting the element to assume. |
| 223 | /// | 230 | /// |
| 224 | /// This *will* switch immediately after a [`LayoutElement::request_size()`] call. | 231 | /// This *will* switch immediately after a [`LayoutElement::request_size()`] call. |
| 225 | - fn is_pending_fullscreen(&self) -> bool; | 232 | + fn pending_sizing_mode(&self) -> SizingMode; |
| 226 | 233 | ||
| 227 | /// Size previously requested through [`LayoutElement::request_size()`]. | 234 | /// Size previously requested through [`LayoutElement::request_size()`]. |
| 228 | fn requested_size(&self) -> Option<Size<i32, Logical>>; | 235 | fn requested_size(&self) -> Option<Size<i32, Logical>>; |
| @@ -240,7 +247,7 @@ pub trait LayoutElement { | |||
| 240 | /// | 247 | /// |
| 241 | /// The default impl is for testing only, it will not preserve the window's own size changes. | 248 | /// The default impl is for testing only, it will not preserve the window's own size changes. |
| 242 | fn expected_size(&self) -> Option<Size<i32, Logical>> { | 249 | fn expected_size(&self) -> Option<Size<i32, Logical>> { |
| 243 | - if self.is_fullscreen() { | 250 | + if self.sizing_mode().is_fullscreen() { |
| 244 | return None; | 251 | return None; |
| 245 | } | 252 | } |
| 246 | 253 | ||
| @@ -502,6 +509,23 @@ struct OverviewGesture { | |||
| 502 | value: f64, | 509 | value: f64, |
| 503 | } | 510 | } |
| 504 | 511 | ||
| 512 | +impl SizingMode { | ||
| 513 | + #[must_use] | ||
| 514 | + pub fn is_normal(&self) -> bool { | ||
| 515 | + matches!(self, Self::Normal) | ||
| 516 | + } | ||
| 517 | + | ||
| 518 | + #[must_use] | ||
| 519 | + pub fn is_fullscreen(&self) -> bool { | ||
| 520 | + matches!(self, Self::Fullscreen) | ||
| 521 | + } | ||
| 522 | + | ||
| 523 | + #[must_use] | ||
| 524 | + pub fn is_maximized(&self) -> bool { | ||
| 525 | + matches!(self, Self::Maximized) | ||
| 526 | + } | ||
| 527 | +} | ||
| 528 | + | ||
| 505 | impl<W: LayoutElement> InteractiveMoveState<W> { | 529 | impl<W: LayoutElement> InteractiveMoveState<W> { |
| 506 | fn moving(&self) -> Option<&InteractiveMoveData<W>> { | 530 | fn moving(&self) -> Option<&InteractiveMoveData<W>> { |
| 507 | match self { | 531 | match self { |
| @@ -2321,7 +2345,7 @@ impl<W: LayoutElement> Layout<W> { | |||
| 2321 | } | 2345 | } |
| 2322 | InteractiveMoveState::Moving(move_) => { | 2346 | InteractiveMoveState::Moving(move_) => { |
| 2323 | assert_eq!(self.clock, move_.tile.clock); | 2347 | assert_eq!(self.clock, move_.tile.clock); |
| 2324 | - assert!(!move_.tile.window().is_pending_fullscreen()); | 2348 | + assert!(move_.tile.window().pending_sizing_mode().is_normal()); |
| 2325 | 2349 | ||
| 2326 | move_.tile.verify_invariants(); | 2350 | move_.tile.verify_invariants(); |
| 2327 | 2351 | ||
| @@ -3456,7 +3480,7 @@ impl<W: LayoutElement> Layout<W> { | |||
| 3456 | 3480 | ||
| 3457 | pub fn toggle_windowed_fullscreen(&mut self, id: &W::Id) { | 3481 | pub fn toggle_windowed_fullscreen(&mut self, id: &W::Id) { |
| 3458 | let (_, window) = self.windows().find(|(_, win)| win.id() == id).unwrap(); | 3482 | let (_, window) = self.windows().find(|(_, win)| win.id() == id).unwrap(); |
| 3459 | - if window.is_pending_fullscreen() { | 3483 | + if window.pending_sizing_mode().is_fullscreen() { |
| 3460 | // Remove the real fullscreen. | 3484 | // Remove the real fullscreen. |
| 3461 | for ws in self.workspaces_mut() { | 3485 | for ws in self.workspaces_mut() { |
| 3462 | if ws.has_window(id) { | 3486 | if ws.has_window(id) { |
| @@ -3474,6 +3498,36 @@ impl<W: LayoutElement> Layout<W> { | |||
| 3474 | }); | 3498 | }); |
| 3475 | } | 3499 | } |
| 3476 | 3500 | ||
| 3501 | + pub fn set_maximized(&mut self, id: &W::Id, maximize: bool) { | ||
| 3502 | + if let Some(InteractiveMoveState::Moving(move_)) = &self.interactive_move { | ||
| 3503 | + if move_.tile.window().id() == id { | ||
| 3504 | + return; | ||
| 3505 | + } | ||
| 3506 | + } | ||
| 3507 | + | ||
| 3508 | + for ws in self.workspaces_mut() { | ||
| 3509 | + if ws.has_window(id) { | ||
| 3510 | + ws.set_maximized(id, maximize); | ||
| 3511 | + return; | ||
| 3512 | + } | ||
| 3513 | + } | ||
| 3514 | + } | ||
| 3515 | + | ||
| 3516 | + pub fn toggle_maximized(&mut self, id: &W::Id) { | ||
| 3517 | + if let Some(InteractiveMoveState::Moving(move_)) = &self.interactive_move { | ||
| 3518 | + if move_.tile.window().id() == id { | ||
| 3519 | + return; | ||
| 3520 | + } | ||
| 3521 | + } | ||
| 3522 | + | ||
| 3523 | + for ws in self.workspaces_mut() { | ||
| 3524 | + if ws.has_window(id) { | ||
| 3525 | + ws.toggle_maximized(id); | ||
| 3526 | + return; | ||
| 3527 | + } | ||
| 3528 | + } | ||
| 3529 | + } | ||
| 3530 | + | ||
| 3477 | pub fn workspace_switch_gesture_begin(&mut self, output: &Output, is_touchpad: bool) { | 3531 | pub fn workspace_switch_gesture_begin(&mut self, output: &Output, is_touchpad: bool) { |
| 3478 | let monitors = match &mut self.monitor_set { | 3532 | let monitors = match &mut self.monitor_set { |
| 3479 | MonitorSet::Normal { monitors, .. } => monitors, | 3533 | MonitorSet::Normal { monitors, .. } => monitors, |
| @@ -3845,6 +3899,7 @@ impl<W: LayoutElement> Layout<W> { | |||
| 3845 | .find(|ws| ws.has_window(&window_id)) | 3899 | .find(|ws| ws.has_window(&window_id)) |
| 3846 | .unwrap(); | 3900 | .unwrap(); |
| 3847 | ws.set_fullscreen(window, false); | 3901 | ws.set_fullscreen(window, false); |
| 3902 | + ws.set_maximized(window, false); | ||
| 3848 | 3903 | ||
| 3849 | let RemovedTile { | 3904 | let RemovedTile { |
| 3850 | mut tile, | 3905 | mut tile, |
src/layout/scrolling.rsmodified+278 -85
| @@ -18,6 +18,7 @@ use super::workspace::{InteractiveResize, ResolvedSize}; | |||
| 18 | use super::{ConfigureIntent, HitType, InteractiveResizeData, LayoutElement, Options, RemovedTile}; | 18 | use super::{ConfigureIntent, HitType, InteractiveResizeData, LayoutElement, Options, RemovedTile}; |
| 19 | use crate::animation::{Animation, Clock}; | 19 | use crate::animation::{Animation, Clock}; |
| 20 | use crate::input::swipe_tracker::SwipeTracker; | 20 | use crate::input::swipe_tracker::SwipeTracker; |
| 21 | +use crate::layout::SizingMode; | ||
| 21 | use crate::niri_render_elements; | 22 | use crate::niri_render_elements; |
| 22 | use crate::render_helpers::renderer::NiriRenderer; | 23 | use crate::render_helpers::renderer::NiriRenderer; |
| 23 | use crate::render_helpers::RenderTarget; | 24 | use crate::render_helpers::RenderTarget; |
| @@ -62,8 +63,8 @@ pub struct ScrollingSpace<W: LayoutElement> { | |||
| 62 | /// The value is the view offset that the previous column had before, to restore it. | 63 | /// The value is the view offset that the previous column had before, to restore it. |
| 63 | activate_prev_column_on_removal: Option<f64>, | 64 | activate_prev_column_on_removal: Option<f64>, |
| 64 | 65 | ||
| 65 | - /// View offset to restore after unfullscreening. | 66 | + /// View offset to restore after unfullscreening or unmaximizing. |
| 66 | - view_offset_before_fullscreen: Option<f64>, | 67 | + view_offset_to_restore: Option<f64>, |
| 67 | 68 | ||
| 68 | /// Windows in the closing animation. | 69 | /// Windows in the closing animation. |
| 69 | closing_windows: Vec<ClosingWindow>, | 70 | closing_windows: Vec<ClosingWindow>, |
| @@ -177,6 +178,13 @@ pub struct Column<W: LayoutElement> { | |||
| 177 | /// take some time to catch up and actually unfullscreen. | 178 | /// take some time to catch up and actually unfullscreen. |
| 178 | is_pending_fullscreen: bool, | 179 | is_pending_fullscreen: bool, |
| 179 | 180 | ||
| 181 | + /// Whether this column is going to be maximized. | ||
| 182 | + /// | ||
| 183 | + /// Can be `true` together with `is_pending_fullscreen`, which means that the column is | ||
| 184 | + /// effectively pending fullscreen, but unfullscreening should go back to maximized state, | ||
| 185 | + /// rather than normal. | ||
| 186 | + is_pending_maximized: bool, | ||
| 187 | + | ||
| 180 | /// How this column displays and arranges windows. | 188 | /// How this column displays and arranges windows. |
| 181 | display_mode: ColumnDisplay, | 189 | display_mode: ColumnDisplay, |
| 182 | 190 | ||
| @@ -192,6 +200,11 @@ pub struct Column<W: LayoutElement> { | |||
| 192 | /// Latest known working area for this column's workspace. | 200 | /// Latest known working area for this column's workspace. |
| 193 | working_area: Rectangle<f64, Logical>, | 201 | working_area: Rectangle<f64, Logical>, |
| 194 | 202 | ||
| 203 | + /// Working area for this column's workspace excluding struts. | ||
| 204 | + /// | ||
| 205 | + /// Used for maximize-to-edges. | ||
| 206 | + parent_area: Rectangle<f64, Logical>, | ||
| 207 | + | ||
| 195 | /// Scale of the output the column is on (and rounds its sizes to). | 208 | /// Scale of the output the column is on (and rounds its sizes to). |
| 196 | scale: f64, | 209 | scale: f64, |
| 197 | 210 | ||
| @@ -285,7 +298,7 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 285 | interactive_resize: None, | 298 | interactive_resize: None, |
| 286 | view_offset: ViewOffset::Static(0.), | 299 | view_offset: ViewOffset::Static(0.), |
| 287 | activate_prev_column_on_removal: None, | 300 | activate_prev_column_on_removal: None, |
| 288 | - view_offset_before_fullscreen: None, | 301 | + view_offset_to_restore: None, |
| 289 | closing_windows: Vec::new(), | 302 | closing_windows: Vec::new(), |
| 290 | view_size, | 303 | view_size, |
| 291 | working_area, | 304 | working_area, |
| @@ -306,7 +319,7 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 306 | let working_area = compute_working_area(parent_area, scale, options.layout.struts); | 319 | let working_area = compute_working_area(parent_area, scale, options.layout.struts); |
| 307 | 320 | ||
| 308 | for (column, data) in zip(&mut self.columns, &mut self.data) { | 321 | for (column, data) in zip(&mut self.columns, &mut self.data) { |
| 309 | - column.update_config(view_size, working_area, scale, options.clone()); | 322 | + column.update_config(view_size, working_area, parent_area, scale, options.clone()); |
| 310 | data.update(column); | 323 | data.update(column); |
| 311 | } | 324 | } |
| 312 | 325 | ||
| @@ -440,7 +453,7 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 440 | } | 453 | } |
| 441 | 454 | ||
| 442 | let col = &self.columns[self.active_column_idx]; | 455 | let col = &self.columns[self.active_column_idx]; |
| 443 | - col.is_pending_fullscreen | 456 | + col.pending_sizing_mode().is_fullscreen() |
| 444 | } | 457 | } |
| 445 | 458 | ||
| 446 | pub fn new_window_toplevel_bounds(&self, rules: &ResolvedWindowRules) -> Size<i32, Logical> { | 459 | pub fn new_window_toplevel_bounds(&self, rules: &ResolvedWindowRules) -> Size<i32, Logical> { |
| @@ -533,24 +546,25 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 533 | target_x: Option<f64>, | 546 | target_x: Option<f64>, |
| 534 | col_x: f64, | 547 | col_x: f64, |
| 535 | width: f64, | 548 | width: f64, |
| 536 | - is_fullscreen: bool, | 549 | + mode: SizingMode, |
| 537 | ) -> f64 { | 550 | ) -> f64 { |
| 538 | - if is_fullscreen { | 551 | + if mode.is_fullscreen() { |
| 539 | return 0.; | 552 | return 0.; |
| 540 | } | 553 | } |
| 541 | 554 | ||
| 555 | + let (area, padding) = if mode.is_maximized() { | ||
| 556 | + (self.parent_area, 0.) | ||
| 557 | + } else { | ||
| 558 | + (self.working_area, self.options.layout.gaps) | ||
| 559 | + }; | ||
| 560 | + | ||
| 542 | let target_x = target_x.unwrap_or_else(|| self.target_view_pos()); | 561 | let target_x = target_x.unwrap_or_else(|| self.target_view_pos()); |
| 543 | 562 | ||
| 544 | - let new_offset = compute_new_view_offset( | 563 | + let new_offset = |
| 545 | - target_x + self.working_area.loc.x, | 564 | + compute_new_view_offset(target_x + area.loc.x, area.size.w, col_x, width, padding); |
| 546 | - self.working_area.size.w, | ||
| 547 | - col_x, | ||
| 548 | - width, | ||
| 549 | - self.options.layout.gaps, | ||
| 550 | - ); | ||
| 551 | 565 | ||
| 552 | // Non-fullscreen windows are always offset at least by the working area position. | 566 | // Non-fullscreen windows are always offset at least by the working area position. |
| 553 | - new_offset - self.working_area.loc.x | 567 | + new_offset - area.loc.x |
| 554 | } | 568 | } |
| 555 | 569 | ||
| 556 | fn compute_new_view_offset_centered( | 570 | fn compute_new_view_offset_centered( |
| @@ -558,18 +572,24 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 558 | target_x: Option<f64>, | 572 | target_x: Option<f64>, |
| 559 | col_x: f64, | 573 | col_x: f64, |
| 560 | width: f64, | 574 | width: f64, |
| 561 | - is_fullscreen: bool, | 575 | + mode: SizingMode, |
| 562 | ) -> f64 { | 576 | ) -> f64 { |
| 563 | - if is_fullscreen { | 577 | + if mode.is_fullscreen() { |
| 564 | - return self.compute_new_view_offset_fit(target_x, col_x, width, is_fullscreen); | 578 | + return self.compute_new_view_offset_fit(target_x, col_x, width, mode); |
| 565 | } | 579 | } |
| 566 | 580 | ||
| 581 | + let area = if mode.is_maximized() { | ||
| 582 | + self.parent_area | ||
| 583 | + } else { | ||
| 584 | + self.working_area | ||
| 585 | + }; | ||
| 586 | + | ||
| 567 | // Columns wider than the view are left-aligned (the fit code can deal with that). | 587 | // Columns wider than the view are left-aligned (the fit code can deal with that). |
| 568 | - if self.working_area.size.w <= width { | 588 | + if area.size.w <= width { |
| 569 | - return self.compute_new_view_offset_fit(target_x, col_x, width, is_fullscreen); | 589 | + return self.compute_new_view_offset_fit(target_x, col_x, width, mode); |
| 570 | } | 590 | } |
| 571 | 591 | ||
| 572 | - -(self.working_area.size.w - width) / 2. - self.working_area.loc.x | 592 | + -(area.size.w - width) / 2. - area.loc.x |
| 573 | } | 593 | } |
| 574 | 594 | ||
| 575 | fn compute_new_view_offset_for_column_fit(&self, target_x: Option<f64>, idx: usize) -> f64 { | 595 | fn compute_new_view_offset_for_column_fit(&self, target_x: Option<f64>, idx: usize) -> f64 { |
| @@ -578,7 +598,7 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 578 | target_x, | 598 | target_x, |
| 579 | self.column_x(idx), | 599 | self.column_x(idx), |
| 580 | col.width(), | 600 | col.width(), |
| 581 | - col.is_fullscreen(), | 601 | + col.sizing_mode(), |
| 582 | ) | 602 | ) |
| 583 | } | 603 | } |
| 584 | 604 | ||
| @@ -592,7 +612,7 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 592 | target_x, | 612 | target_x, |
| 593 | self.column_x(idx), | 613 | self.column_x(idx), |
| 594 | col.width(), | 614 | col.width(), |
| 595 | - col.is_fullscreen(), | 615 | + col.sizing_mode(), |
| 596 | ) | 616 | ) |
| 597 | } | 617 | } |
| 598 | 618 | ||
| @@ -633,6 +653,8 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 633 | let target_col_x = self.column_x(idx); | 653 | let target_col_x = self.column_x(idx); |
| 634 | let target_col_width = self.columns[idx].width(); | 654 | let target_col_width = self.columns[idx].width(); |
| 635 | 655 | ||
| 656 | + // NOTE: This logic won't work entirely correctly with small fixed-size maximized | ||
| 657 | + // windows (they have a different area and padding). | ||
| 636 | let total_width = if source_col_x < target_col_x { | 658 | let total_width = if source_col_x < target_col_x { |
| 637 | // Source is left from target. | 659 | // Source is left from target. |
| 638 | target_col_x - source_col_x + target_col_width | 660 | target_col_x - source_col_x + target_col_width |
| @@ -770,7 +792,7 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 770 | 792 | ||
| 771 | // A different column was activated; reset the flag. | 793 | // A different column was activated; reset the flag. |
| 772 | self.activate_prev_column_on_removal = None; | 794 | self.activate_prev_column_on_removal = None; |
| 773 | - self.view_offset_before_fullscreen = None; | 795 | + self.view_offset_to_restore = None; |
| 774 | self.interactive_resize = None; | 796 | self.interactive_resize = None; |
| 775 | } | 797 | } |
| 776 | } | 798 | } |
| @@ -855,6 +877,7 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 855 | tile, | 877 | tile, |
| 856 | self.view_size, | 878 | self.view_size, |
| 857 | self.working_area, | 879 | self.working_area, |
| 880 | + self.parent_area, | ||
| 858 | self.scale, | 881 | self.scale, |
| 859 | width, | 882 | width, |
| 860 | is_full_width, | 883 | is_full_width, |
| @@ -956,6 +979,7 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 956 | column.update_config( | 979 | column.update_config( |
| 957 | self.view_size, | 980 | self.view_size, |
| 958 | self.working_area, | 981 | self.working_area, |
| 982 | + self.parent_area, | ||
| 959 | self.scale, | 983 | self.scale, |
| 960 | self.options.clone(), | 984 | self.options.clone(), |
| 961 | ); | 985 | ); |
| @@ -1059,15 +1083,15 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 1059 | tile.animate_alpha(0., 1., movement_config); | 1083 | tile.animate_alpha(0., 1., movement_config); |
| 1060 | } | 1084 | } |
| 1061 | 1085 | ||
| 1062 | - let was_fullscreen = column.is_fullscreen(); | 1086 | + let was_normal = column.sizing_mode().is_normal(); |
| 1063 | 1087 | ||
| 1064 | let tile = column.tiles.remove(tile_idx); | 1088 | let tile = column.tiles.remove(tile_idx); |
| 1065 | column.data.remove(tile_idx); | 1089 | column.data.remove(tile_idx); |
| 1066 | 1090 | ||
| 1067 | // If an active column became non-fullscreen after removing the tile, clear the stored | 1091 | // If an active column became non-fullscreen after removing the tile, clear the stored |
| 1068 | // unfullscreen offset. | 1092 | // unfullscreen offset. |
| 1069 | - if column_idx == self.active_column_idx && was_fullscreen && !column.is_fullscreen() { | 1093 | + if column_idx == self.active_column_idx && !was_normal && column.sizing_mode().is_normal() { |
| 1070 | - self.view_offset_before_fullscreen = None; | 1094 | + self.view_offset_to_restore = None; |
| 1071 | } | 1095 | } |
| 1072 | 1096 | ||
| 1073 | // If one window is left, reset its weight to 1. | 1097 | // If one window is left, reset its weight to 1. |
| @@ -1171,7 +1195,7 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 1171 | } | 1195 | } |
| 1172 | 1196 | ||
| 1173 | if column_idx == self.active_column_idx { | 1197 | if column_idx == self.active_column_idx { |
| 1174 | - self.view_offset_before_fullscreen = None; | 1198 | + self.view_offset_to_restore = None; |
| 1175 | } | 1199 | } |
| 1176 | 1200 | ||
| 1177 | if self.columns.is_empty() { | 1201 | if self.columns.is_empty() { |
| @@ -1225,7 +1249,7 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 1225 | .enumerate() | 1249 | .enumerate() |
| 1226 | .find(|(_, col)| col.contains(window)) | 1250 | .find(|(_, col)| col.contains(window)) |
| 1227 | .unwrap(); | 1251 | .unwrap(); |
| 1228 | - let was_fullscreen = column.is_fullscreen(); | 1252 | + let was_normal = column.sizing_mode().is_normal(); |
| 1229 | let prev_origin = column.tiles_origin(); | 1253 | let prev_origin = column.tiles_origin(); |
| 1230 | 1254 | ||
| 1231 | let (tile_idx, tile) = column | 1255 | let (tile_idx, tile) = column |
| @@ -1337,9 +1361,9 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 1337 | } | 1361 | } |
| 1338 | 1362 | ||
| 1339 | // When the active column goes fullscreen, store the view offset to restore later. | 1363 | // When the active column goes fullscreen, store the view offset to restore later. |
| 1340 | - let is_fullscreen = self.columns[col_idx].is_fullscreen(); | 1364 | + let is_normal = self.columns[col_idx].sizing_mode().is_normal(); |
| 1341 | - if !was_fullscreen && is_fullscreen { | 1365 | + if was_normal && !is_normal { |
| 1342 | - self.view_offset_before_fullscreen = Some(self.view_offset.stationary()); | 1366 | + self.view_offset_to_restore = Some(self.view_offset.stationary()); |
| 1343 | } | 1367 | } |
| 1344 | 1368 | ||
| 1345 | // Upon unfullscreening, restore the view offset. | 1369 | // Upon unfullscreening, restore the view offset. |
| @@ -1348,11 +1372,11 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 1348 | // will unfullscreen one by one, and the column width will shrink only when the | 1372 | // will unfullscreen one by one, and the column width will shrink only when the |
| 1349 | // last tile unfullscreens. This is when we want to restore the view offset, | 1373 | // last tile unfullscreens. This is when we want to restore the view offset, |
| 1350 | // otherwise it will immediately reset back by the animate_view_offset below. | 1374 | // otherwise it will immediately reset back by the animate_view_offset below. |
| 1351 | - let unfullscreen_offset = if was_fullscreen && !is_fullscreen { | 1375 | + let unfullscreen_offset = if !was_normal && is_normal { |
| 1352 | // Take the value unconditionally, even if the view is currently frozen by | 1376 | // Take the value unconditionally, even if the view is currently frozen by |
| 1353 | // a view gesture. It shouldn't linger around because it's only valid for this | 1377 | // a view gesture. It shouldn't linger around because it's only valid for this |
| 1354 | // particular unfullscreen. | 1378 | // particular unfullscreen. |
| 1355 | - self.view_offset_before_fullscreen.take() | 1379 | + self.view_offset_to_restore.take() |
| 1356 | } else { | 1380 | } else { |
| 1357 | None | 1381 | None |
| 1358 | }; | 1382 | }; |
| @@ -2165,6 +2189,7 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 2165 | if col.display_mode != ColumnDisplay::Tabbed && col.tiles.len() > 1 { | 2189 | if col.display_mode != ColumnDisplay::Tabbed && col.tiles.len() > 1 { |
| 2166 | let window = col.tiles[col.active_tile_idx].window().id().clone(); | 2190 | let window = col.tiles[col.active_tile_idx].window().id().clone(); |
| 2167 | self.set_fullscreen(&window, false); | 2191 | self.set_fullscreen(&window, false); |
| 2192 | + self.set_maximized(&window, false); | ||
| 2168 | } | 2193 | } |
| 2169 | } | 2194 | } |
| 2170 | 2195 | ||
| @@ -2307,6 +2332,10 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 2307 | iter::once(active_pos).chain(offsets) | 2332 | iter::once(active_pos).chain(offsets) |
| 2308 | } | 2333 | } |
| 2309 | 2334 | ||
| 2335 | + pub fn columns(&self) -> impl Iterator<Item = &Column<W>> { | ||
| 2336 | + self.columns.iter() | ||
| 2337 | + } | ||
| 2338 | + | ||
| 2310 | fn columns_mut(&mut self) -> impl Iterator<Item = (&mut Column<W>, f64)> + '_ { | 2339 | fn columns_mut(&mut self) -> impl Iterator<Item = (&mut Column<W>, f64)> + '_ { |
| 2311 | let offsets = self.column_xs(self.data.iter().copied()); | 2340 | let offsets = self.column_xs(self.data.iter().copied()); |
| 2312 | zip(&mut self.columns, offsets) | 2341 | zip(&mut self.columns, offsets) |
| @@ -2474,7 +2503,7 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 2474 | 2503 | ||
| 2475 | // Adjust for place-within-column tab indicator. | 2504 | // Adjust for place-within-column tab indicator. |
| 2476 | let origin_x = col.tiles_origin().x; | 2505 | let origin_x = col.tiles_origin().x; |
| 2477 | - let extra_w = if is_tabbed && !col.is_fullscreen() { | 2506 | + let extra_w = if is_tabbed && col.sizing_mode().is_normal() { |
| 2478 | col.tab_indicator.extra_size(col.tiles.len(), col.scale).w | 2507 | col.tab_indicator.extra_size(col.tiles.len(), col.scale).w |
| 2479 | } else { | 2508 | } else { |
| 2480 | 0. | 2509 | 0. |
| @@ -2491,9 +2520,14 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 2491 | // effect here. | 2520 | // effect here. |
| 2492 | if self.columns.is_empty() { | 2521 | if self.columns.is_empty() { |
| 2493 | let view_offset = if self.is_centering_focused_column() { | 2522 | let view_offset = if self.is_centering_focused_column() { |
| 2494 | - self.compute_new_view_offset_centered(Some(0.), 0., hint_area.size.w, false) | 2523 | + self.compute_new_view_offset_centered( |
| 2524 | + Some(0.), | ||
| 2525 | + 0., | ||
| 2526 | + hint_area.size.w, | ||
| 2527 | + SizingMode::Normal, | ||
| 2528 | + ) | ||
| 2495 | } else { | 2529 | } else { |
| 2496 | - self.compute_new_view_offset_fit(Some(0.), 0., hint_area.size.w, false) | 2530 | + self.compute_new_view_offset_fit(Some(0.), 0., hint_area.size.w, SizingMode::Normal) |
| 2497 | }; | 2531 | }; |
| 2498 | hint_area.loc.x -= view_offset; | 2532 | hint_area.loc.x -= view_offset; |
| 2499 | } else { | 2533 | } else { |
| @@ -2693,7 +2727,7 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 2693 | } | 2727 | } |
| 2694 | 2728 | ||
| 2695 | let col = &mut self.columns[self.active_column_idx]; | 2729 | let col = &mut self.columns[self.active_column_idx]; |
| 2696 | - if col.is_pending_fullscreen || col.is_full_width { | 2730 | + if !col.pending_sizing_mode().is_normal() || col.is_full_width { |
| 2697 | return; | 2731 | return; |
| 2698 | } | 2732 | } |
| 2699 | 2733 | ||
| @@ -2709,6 +2743,9 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 2709 | return; | 2743 | return; |
| 2710 | } | 2744 | } |
| 2711 | 2745 | ||
| 2746 | + // NOTE: This logic won't work entirely correctly with small fixed-size maximized windows | ||
| 2747 | + // (they have a different area and padding). | ||
| 2748 | + | ||
| 2712 | // Consider the end of an ongoing animation because that's what compute to fit does too. | 2749 | // Consider the end of an ongoing animation because that's what compute to fit does too. |
| 2713 | let view_x = self.target_view_pos(); | 2750 | let view_x = self.target_view_pos(); |
| 2714 | let working_x = self.working_area.loc.x; | 2751 | let working_x = self.working_area.loc.x; |
| @@ -2812,6 +2849,37 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 2812 | true | 2849 | true |
| 2813 | } | 2850 | } |
| 2814 | 2851 | ||
| 2852 | + pub fn set_maximized(&mut self, window: &W::Id, maximize: bool) -> bool { | ||
| 2853 | + let mut col_idx = self | ||
| 2854 | + .columns | ||
| 2855 | + .iter() | ||
| 2856 | + .position(|col| col.contains(window)) | ||
| 2857 | + .unwrap(); | ||
| 2858 | + | ||
| 2859 | + if maximize == self.columns[col_idx].is_pending_maximized { | ||
| 2860 | + return false; | ||
| 2861 | + } | ||
| 2862 | + | ||
| 2863 | + let mut col = &mut self.columns[col_idx]; | ||
| 2864 | + let is_tabbed = col.display_mode == ColumnDisplay::Tabbed; | ||
| 2865 | + | ||
| 2866 | + cancel_resize_for_column(&mut self.interactive_resize, col); | ||
| 2867 | + | ||
| 2868 | + if maximize && (col.tiles.len() > 1 && !is_tabbed) { | ||
| 2869 | + // This wasn't the only window in its column; extract it into a separate column. | ||
| 2870 | + self.consume_or_expel_window_right(Some(window)); | ||
| 2871 | + col_idx += 1; | ||
| 2872 | + col = &mut self.columns[col_idx]; | ||
| 2873 | + } | ||
| 2874 | + | ||
| 2875 | + col.set_maximized(maximize); | ||
| 2876 | + | ||
| 2877 | + // With place_within_column, the tab indicator changes the column size immediately. | ||
| 2878 | + self.data[col_idx].update(col); | ||
| 2879 | + | ||
| 2880 | + true | ||
| 2881 | + } | ||
| 2882 | + | ||
| 2815 | pub fn render_above_top_layer(&self) -> bool { | 2883 | pub fn render_above_top_layer(&self) -> bool { |
| 2816 | // Render above the top layer if we're on a fullscreen window and the view is stationary. | 2884 | // Render above the top layer if we're on a fullscreen window and the view is stationary. |
| 2817 | if self.columns.is_empty() { | 2885 | if self.columns.is_empty() { |
| @@ -2822,7 +2890,9 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 2822 | return false; | 2890 | return false; |
| 2823 | } | 2891 | } |
| 2824 | 2892 | ||
| 2825 | - self.columns[self.active_column_idx].is_fullscreen() | 2893 | + self.columns[self.active_column_idx] |
| 2894 | + .sizing_mode() | ||
| 2895 | + .is_fullscreen() | ||
| 2826 | } | 2896 | } |
| 2827 | 2897 | ||
| 2828 | pub fn render_elements<R: NiriRenderer>( | 2898 | pub fn render_elements<R: NiriRenderer>( |
| @@ -2902,7 +2972,7 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 2902 | let col_render_off = col.render_offset(); | 2972 | let col_render_off = col.render_offset(); |
| 2903 | 2973 | ||
| 2904 | // Hit the tab indicator. | 2974 | // Hit the tab indicator. |
| 2905 | - if col.display_mode == ColumnDisplay::Tabbed && !col.is_fullscreen() { | 2975 | + if col.display_mode == ColumnDisplay::Tabbed && col.sizing_mode().is_normal() { |
| 2906 | let col_pos = view_off + col_off + col_render_off; | 2976 | let col_pos = view_off + col_off + col_render_off; |
| 2907 | let col_pos = col_pos.to_physical_precise_round(scale).to_logical(scale); | 2977 | let col_pos = col_pos.to_physical_precise_round(scale).to_logical(scale); |
| 2908 | 2978 | ||
| @@ -3134,20 +3204,26 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 3134 | 3204 | ||
| 3135 | let mut snapping_points = Vec::new(); | 3205 | let mut snapping_points = Vec::new(); |
| 3136 | 3206 | ||
| 3137 | - let left_strut = self.working_area.loc.x; | ||
| 3138 | - let right_strut = self.view_size.w - self.working_area.size.w - self.working_area.loc.x; | ||
| 3139 | - | ||
| 3140 | if self.is_centering_focused_column() { | 3207 | if self.is_centering_focused_column() { |
| 3141 | let mut col_x = 0.; | 3208 | let mut col_x = 0.; |
| 3142 | for (col_idx, col) in self.columns.iter().enumerate() { | 3209 | for (col_idx, col) in self.columns.iter().enumerate() { |
| 3143 | let col_w = col.width(); | 3210 | let col_w = col.width(); |
| 3211 | + let mode = col.sizing_mode(); | ||
| 3144 | 3212 | ||
| 3145 | - let view_pos = if col.is_fullscreen() { | 3213 | + let area = if mode.is_maximized() { |
| 3214 | + self.parent_area | ||
| 3215 | + } else { | ||
| 3216 | + self.working_area | ||
| 3217 | + }; | ||
| 3218 | + | ||
| 3219 | + let left_strut = area.loc.x; | ||
| 3220 | + | ||
| 3221 | + let view_pos = if mode.is_fullscreen() { | ||
| 3146 | col_x | 3222 | col_x |
| 3147 | - } else if self.working_area.size.w <= col_w { | 3223 | + } else if area.size.w <= col_w { |
| 3148 | col_x - left_strut | 3224 | col_x - left_strut |
| 3149 | } else { | 3225 | } else { |
| 3150 | - col_x - (self.working_area.size.w - col_w) / 2. - left_strut | 3226 | + col_x - (area.size.w - col_w) / 2. - left_strut |
| 3151 | }; | 3227 | }; |
| 3152 | snapping_points.push(Snap { view_pos, col_idx }); | 3228 | snapping_points.push(Snap { view_pos, col_idx }); |
| 3153 | 3229 | ||
| @@ -3160,34 +3236,50 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 3160 | ); | 3236 | ); |
| 3161 | 3237 | ||
| 3162 | let view_width = self.view_size.w; | 3238 | let view_width = self.view_size.w; |
| 3163 | - let working_area_width = self.working_area.size.w; | ||
| 3164 | let gaps = self.options.layout.gaps; | 3239 | let gaps = self.options.layout.gaps; |
| 3165 | 3240 | ||
| 3166 | let snap_points = | 3241 | let snap_points = |
| 3167 | |col_x, col: &Column<W>, prev_col_w: Option<f64>, next_col_w: Option<f64>| { | 3242 | |col_x, col: &Column<W>, prev_col_w: Option<f64>, next_col_w: Option<f64>| { |
| 3168 | let col_w = col.width(); | 3243 | let col_w = col.width(); |
| 3244 | + let mode = col.sizing_mode(); | ||
| 3245 | + | ||
| 3246 | + let area = if mode.is_maximized() { | ||
| 3247 | + self.parent_area | ||
| 3248 | + } else { | ||
| 3249 | + self.working_area | ||
| 3250 | + }; | ||
| 3251 | + | ||
| 3252 | + let left_strut = area.loc.x; | ||
| 3253 | + let right_strut = self.view_size.w - area.size.w - area.loc.x; | ||
| 3169 | 3254 | ||
| 3170 | // Normal columns align with the working area, but fullscreen columns align with | 3255 | // Normal columns align with the working area, but fullscreen columns align with |
| 3171 | // the view size. | 3256 | // the view size. |
| 3172 | - if col.is_fullscreen() { | 3257 | + if mode.is_fullscreen() { |
| 3173 | let left = col_x; | 3258 | let left = col_x; |
| 3174 | - let right = col_x + col_w; | 3259 | + let right = left + col_w; |
| 3175 | (left, right) | 3260 | (left, right) |
| 3176 | } else { | 3261 | } else { |
| 3177 | // Logic from compute_new_view_offset. | 3262 | // Logic from compute_new_view_offset. |
| 3178 | - let padding = ((working_area_width - col_w) / 2.).clamp(0., gaps); | 3263 | + let padding = if mode.is_maximized() { |
| 3264 | + 0. | ||
| 3265 | + } else { | ||
| 3266 | + ((area.size.w - col_w) / 2.).clamp(0., gaps) | ||
| 3267 | + }; | ||
| 3179 | 3268 | ||
| 3180 | - let center = if self.working_area.size.w <= col_w { | 3269 | + let center = if area.size.w <= col_w { |
| 3181 | col_x - left_strut | 3270 | col_x - left_strut |
| 3182 | } else { | 3271 | } else { |
| 3183 | - col_x - (self.working_area.size.w - col_w) / 2. - left_strut | 3272 | + col_x - (area.size.w - col_w) / 2. - left_strut |
| 3184 | }; | 3273 | }; |
| 3185 | let is_overflowing = |adj_col_w: Option<f64>| { | 3274 | let is_overflowing = |adj_col_w: Option<f64>| { |
| 3186 | center_on_overflow | 3275 | center_on_overflow |
| 3187 | && adj_col_w | 3276 | && adj_col_w |
| 3188 | .filter(|adj_col_w| { | 3277 | .filter(|adj_col_w| { |
| 3278 | + // NOTE: This logic won't work entirely correctly with small | ||
| 3279 | + // fixed-size maximized windows (they have a different area | ||
| 3280 | + // and padding). | ||
| 3189 | center_on_overflow | 3281 | center_on_overflow |
| 3190 | - && adj_col_w + 3.0 * gaps + col_w > working_area_width | 3282 | + && adj_col_w + 3.0 * gaps + col_w > area.size.w |
| 3191 | }) | 3283 | }) |
| 3192 | .is_some() | 3284 | .is_some() |
| 3193 | }; | 3285 | }; |
| @@ -3211,6 +3303,14 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 3211 | // | 3303 | // |
| 3212 | // It's ok if leftmost_snap is > rightmost_snap (this happens if the columns on a | 3304 | // It's ok if leftmost_snap is > rightmost_snap (this happens if the columns on a |
| 3213 | // workspace total up to less than the workspace width). | 3305 | // workspace total up to less than the workspace width). |
| 3306 | + | ||
| 3307 | + // The first column's left snap isn't actually guaranteed to be the *leftmost* snap. | ||
| 3308 | + // With weird enough left strut and perhaps a maximized small fixed-size window, you | ||
| 3309 | + // can make the second window's left snap be further to the left than the first | ||
| 3310 | + // window's. The same goes for the rightmost snap. | ||
| 3311 | + // | ||
| 3312 | + // This isn't actually a big problem because it's very much an obscure edge case. Just | ||
| 3313 | + // need to make sure the code doesn't panic when that happens. | ||
| 3214 | let leftmost_snap = snap_points( | 3314 | let leftmost_snap = snap_points( |
| 3215 | 0., | 3315 | 0., |
| 3216 | &self.columns[0], | 3316 | &self.columns[0], |
| @@ -3295,16 +3395,28 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 3295 | let col = &self.columns[col_idx]; | 3395 | let col = &self.columns[col_idx]; |
| 3296 | let col_x = self.column_x(col_idx); | 3396 | let col_x = self.column_x(col_idx); |
| 3297 | let col_w = col.width(); | 3397 | let col_w = col.width(); |
| 3398 | + let mode = col.sizing_mode(); | ||
| 3399 | + | ||
| 3400 | + let area = if mode.is_maximized() { | ||
| 3401 | + self.parent_area | ||
| 3402 | + } else { | ||
| 3403 | + self.working_area | ||
| 3404 | + }; | ||
| 3298 | 3405 | ||
| 3299 | - if col.is_fullscreen() { | 3406 | + let left_strut = area.loc.x; |
| 3407 | + | ||
| 3408 | + if mode.is_fullscreen() { | ||
| 3300 | if target_snap.view_pos + self.view_size.w < col_x + col_w { | 3409 | if target_snap.view_pos + self.view_size.w < col_x + col_w { |
| 3301 | break; | 3410 | break; |
| 3302 | } | 3411 | } |
| 3303 | } else { | 3412 | } else { |
| 3304 | - let padding = ((self.working_area.size.w - col_w) / 2.) | 3413 | + let padding = if mode.is_maximized() { |
| 3305 | - .clamp(0., self.options.layout.gaps); | 3414 | + 0. |
| 3306 | - if target_snap.view_pos + left_strut + self.working_area.size.w | 3415 | + } else { |
| 3307 | - < col_x + col_w + padding | 3416 | + ((area.size.w - col_w) / 2.).clamp(0., self.options.layout.gaps) |
| 3417 | + }; | ||
| 3418 | + | ||
| 3419 | + if target_snap.view_pos + left_strut + area.size.w < col_x + col_w + padding | ||
| 3308 | { | 3420 | { |
| 3309 | break; | 3421 | break; |
| 3310 | } | 3422 | } |
| @@ -3317,14 +3429,27 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 3317 | let col = &self.columns[col_idx]; | 3429 | let col = &self.columns[col_idx]; |
| 3318 | let col_x = self.column_x(col_idx); | 3430 | let col_x = self.column_x(col_idx); |
| 3319 | let col_w = col.width(); | 3431 | let col_w = col.width(); |
| 3432 | + let mode = col.sizing_mode(); | ||
| 3320 | 3433 | ||
| 3321 | - if col.is_fullscreen() { | 3434 | + let area = if mode.is_maximized() { |
| 3435 | + self.parent_area | ||
| 3436 | + } else { | ||
| 3437 | + self.working_area | ||
| 3438 | + }; | ||
| 3439 | + | ||
| 3440 | + let left_strut = area.loc.x; | ||
| 3441 | + | ||
| 3442 | + if mode.is_fullscreen() { | ||
| 3322 | if col_x < target_snap.view_pos { | 3443 | if col_x < target_snap.view_pos { |
| 3323 | break; | 3444 | break; |
| 3324 | } | 3445 | } |
| 3325 | } else { | 3446 | } else { |
| 3326 | - let padding = ((self.working_area.size.w - col_w) / 2.) | 3447 | + let padding = if mode.is_maximized() { |
| 3327 | - .clamp(0., self.options.layout.gaps); | 3448 | + 0. |
| 3449 | + } else { | ||
| 3450 | + ((area.size.w - col_w) / 2.).clamp(0., self.options.layout.gaps) | ||
| 3451 | + }; | ||
| 3452 | + | ||
| 3328 | if col_x - padding < target_snap.view_pos + left_strut { | 3453 | if col_x - padding < target_snap.view_pos + left_strut { |
| 3329 | break; | 3454 | break; |
| 3330 | } | 3455 | } |
| @@ -3339,7 +3464,7 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 3339 | let delta = active_col_x - new_col_x; | 3464 | let delta = active_col_x - new_col_x; |
| 3340 | 3465 | ||
| 3341 | if self.active_column_idx != new_col_idx { | 3466 | if self.active_column_idx != new_col_idx { |
| 3342 | - self.view_offset_before_fullscreen = None; | 3467 | + self.view_offset_to_restore = None; |
| 3343 | } | 3468 | } |
| 3344 | 3469 | ||
| 3345 | self.active_column_idx = new_col_idx; | 3470 | self.active_column_idx = new_col_idx; |
| @@ -3391,7 +3516,7 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 3391 | .find(|col| col.contains(&window)) | 3516 | .find(|col| col.contains(&window)) |
| 3392 | .unwrap(); | 3517 | .unwrap(); |
| 3393 | 3518 | ||
| 3394 | - if col.is_pending_fullscreen { | 3519 | + if !col.pending_sizing_mode().is_normal() { |
| 3395 | return false; | 3520 | return false; |
| 3396 | } | 3521 | } |
| 3397 | 3522 | ||
| @@ -3637,11 +3762,11 @@ impl<W: LayoutElement> ScrollingSpace<W> { | |||
| 3637 | 3762 | ||
| 3638 | let col = &self.columns[self.active_column_idx]; | 3763 | let col = &self.columns[self.active_column_idx]; |
| 3639 | 3764 | ||
| 3640 | - if self.view_offset_before_fullscreen.is_some() { | 3765 | + if self.view_offset_to_restore.is_some() { |
| 3641 | assert!( | 3766 | assert!( |
| 3642 | - col.is_fullscreen(), | 3767 | + !col.sizing_mode().is_normal(), |
| 3643 | - "when view_offset_before_fullscreen is set, \ | 3768 | + "when view_offset_to_restore is set, \ |
| 3644 | - the active column must be fullscreen" | 3769 | + the active column must be fullscreen or maximized" |
| 3645 | ); | 3770 | ); |
| 3646 | } | 3771 | } |
| 3647 | } | 3772 | } |
| @@ -3796,6 +3921,7 @@ impl<W: LayoutElement> Column<W> { | |||
| 3796 | tile: Tile<W>, | 3921 | tile: Tile<W>, |
| 3797 | view_size: Size<f64, Logical>, | 3922 | view_size: Size<f64, Logical>, |
| 3798 | working_area: Rectangle<f64, Logical>, | 3923 | working_area: Rectangle<f64, Logical>, |
| 3924 | + parent_area: Rectangle<f64, Logical>, | ||
| 3799 | scale: f64, | 3925 | scale: f64, |
| 3800 | width: ColumnWidth, | 3926 | width: ColumnWidth, |
| 3801 | is_full_width: bool, | 3927 | is_full_width: bool, |
| @@ -3815,29 +3941,33 @@ impl<W: LayoutElement> Column<W> { | |||
| 3815 | width, | 3941 | width, |
| 3816 | preset_width_idx: None, | 3942 | preset_width_idx: None, |
| 3817 | is_full_width, | 3943 | is_full_width, |
| 3944 | + is_pending_maximized: false, | ||
| 3818 | is_pending_fullscreen: false, | 3945 | is_pending_fullscreen: false, |
| 3819 | display_mode, | 3946 | display_mode, |
| 3820 | tab_indicator: TabIndicator::new(options.layout.tab_indicator), | 3947 | tab_indicator: TabIndicator::new(options.layout.tab_indicator), |
| 3821 | move_animation: None, | 3948 | move_animation: None, |
| 3822 | view_size, | 3949 | view_size, |
| 3823 | working_area, | 3950 | working_area, |
| 3951 | + parent_area, | ||
| 3824 | scale, | 3952 | scale, |
| 3825 | clock: tile.clock.clone(), | 3953 | clock: tile.clock.clone(), |
| 3826 | options, | 3954 | options, |
| 3827 | }; | 3955 | }; |
| 3828 | 3956 | ||
| 3829 | - let is_pending_fullscreen = tile.window().is_pending_fullscreen(); | 3957 | + let pending_sizing_mode = tile.window().pending_sizing_mode(); |
| 3830 | 3958 | ||
| 3831 | rv.add_tile_at(0, tile); | 3959 | rv.add_tile_at(0, tile); |
| 3832 | 3960 | ||
| 3833 | - if is_pending_fullscreen { | 3961 | + match pending_sizing_mode { |
| 3834 | - rv.set_fullscreen(true); | 3962 | + SizingMode::Normal => (), |
| 3963 | + SizingMode::Maximized => rv.set_maximized(true), | ||
| 3964 | + SizingMode::Fullscreen => rv.set_fullscreen(true), | ||
| 3835 | } | 3965 | } |
| 3836 | 3966 | ||
| 3837 | // Animate the tab indicator for new columns. | 3967 | // Animate the tab indicator for new columns. |
| 3838 | if display_mode == ColumnDisplay::Tabbed | 3968 | if display_mode == ColumnDisplay::Tabbed |
| 3839 | && !rv.options.layout.tab_indicator.hide_when_single_tab | 3969 | && !rv.options.layout.tab_indicator.hide_when_single_tab |
| 3840 | - && !rv.is_fullscreen() | 3970 | + && rv.sizing_mode().is_normal() |
| 3841 | { | 3971 | { |
| 3842 | // Usually new columns are created together with window movement actions. For new | 3972 | // Usually new columns are created together with window movement actions. For new |
| 3843 | // windows, we handle that in start_open_animation(). | 3973 | // windows, we handle that in start_open_animation(). |
| @@ -3852,12 +3982,16 @@ impl<W: LayoutElement> Column<W> { | |||
| 3852 | &mut self, | 3982 | &mut self, |
| 3853 | view_size: Size<f64, Logical>, | 3983 | view_size: Size<f64, Logical>, |
| 3854 | working_area: Rectangle<f64, Logical>, | 3984 | working_area: Rectangle<f64, Logical>, |
| 3985 | + parent_area: Rectangle<f64, Logical>, | ||
| 3855 | scale: f64, | 3986 | scale: f64, |
| 3856 | options: Rc<Options>, | 3987 | options: Rc<Options>, |
| 3857 | ) { | 3988 | ) { |
| 3858 | let mut update_sizes = false; | 3989 | let mut update_sizes = false; |
| 3859 | 3990 | ||
| 3860 | - if self.view_size != view_size || self.working_area != working_area { | 3991 | + if self.view_size != view_size |
| 3992 | + || self.working_area != working_area | ||
| 3993 | + || self.parent_area != parent_area | ||
| 3994 | + { | ||
| 3861 | update_sizes = true; | 3995 | update_sizes = true; |
| 3862 | } | 3996 | } |
| 3863 | 3997 | ||
| @@ -3895,6 +4029,7 @@ impl<W: LayoutElement> Column<W> { | |||
| 3895 | .update_config(options.layout.tab_indicator); | 4029 | .update_config(options.layout.tab_indicator); |
| 3896 | self.view_size = view_size; | 4030 | self.view_size = view_size; |
| 3897 | self.working_area = working_area; | 4031 | self.working_area = working_area; |
| 4032 | + self.parent_area = parent_area; | ||
| 3898 | self.scale = scale; | 4033 | self.scale = scale; |
| 3899 | self.options = options; | 4034 | self.options = options; |
| 3900 | 4035 | ||
| @@ -3954,7 +4089,7 @@ impl<W: LayoutElement> Column<W> { | |||
| 3954 | // you don't want that to happen in fullscreen. Also, laying things out correctly when the | 4089 | // you don't want that to happen in fullscreen. Also, laying things out correctly when the |
| 3955 | // tab indicator is within the column and the column goes fullscreen, would require too | 4090 | // tab indicator is within the column and the column goes fullscreen, would require too |
| 3956 | // many changes to the code for too little benefit (it's mostly invisible anyway). | 4091 | // many changes to the code for too little benefit (it's mostly invisible anyway). |
| 3957 | - let enabled = self.display_mode == ColumnDisplay::Tabbed && !self.is_fullscreen(); | 4092 | + let enabled = self.display_mode == ColumnDisplay::Tabbed && self.sizing_mode().is_normal(); |
| 3958 | 4093 | ||
| 3959 | self.tab_indicator.update_render_elements( | 4094 | self.tab_indicator.update_render_elements( |
| 3960 | enabled, | 4095 | enabled, |
| @@ -3967,6 +4102,24 @@ impl<W: LayoutElement> Column<W> { | |||
| 3967 | ); | 4102 | ); |
| 3968 | } | 4103 | } |
| 3969 | 4104 | ||
| 4105 | + pub fn is_pending_fullscreen(&self) -> bool { | ||
| 4106 | + self.is_pending_fullscreen | ||
| 4107 | + } | ||
| 4108 | + | ||
| 4109 | + pub fn is_pending_maximized(&self) -> bool { | ||
| 4110 | + self.is_pending_maximized | ||
| 4111 | + } | ||
| 4112 | + | ||
| 4113 | + pub fn pending_sizing_mode(&self) -> SizingMode { | ||
| 4114 | + if self.is_pending_fullscreen { | ||
| 4115 | + SizingMode::Fullscreen | ||
| 4116 | + } else if self.is_pending_maximized { | ||
| 4117 | + SizingMode::Maximized | ||
| 4118 | + } else { | ||
| 4119 | + SizingMode::Normal | ||
| 4120 | + } | ||
| 4121 | + } | ||
| 4122 | + | ||
| 3970 | pub fn render_offset(&self) -> Point<f64, Logical> { | 4123 | pub fn render_offset(&self) -> Point<f64, Logical> { |
| 3971 | let mut offset = Point::from((0., 0.)); | 4124 | let mut offset = Point::from((0., 0.)); |
| 3972 | 4125 | ||
| @@ -4040,7 +4193,7 @@ impl<W: LayoutElement> Column<W> { | |||
| 4040 | /// - is_fullscreen() can suddenly change when consuming/expelling a fullscreen tile into/from a | 4193 | /// - is_fullscreen() can suddenly change when consuming/expelling a fullscreen tile into/from a |
| 4041 | /// non-fullscreen column. This can influence the code that saves/restores the unfullscreen | 4194 | /// non-fullscreen column. This can influence the code that saves/restores the unfullscreen |
| 4042 | /// view offset. | 4195 | /// view offset. |
| 4043 | - fn is_fullscreen(&self) -> bool { | 4196 | + fn sizing_mode(&self) -> SizingMode { |
| 4044 | // Behaviors that we want: | 4197 | // Behaviors that we want: |
| 4045 | // | 4198 | // |
| 4046 | // 1. The common case: single tile in a column. Assume no animations. Fullscreening the tile | 4199 | // 1. The common case: single tile in a column. Assume no animations. Fullscreening the tile |
| @@ -4058,7 +4211,23 @@ impl<W: LayoutElement> Column<W> { | |||
| 4058 | // mode change applies instantly). | 4211 | // mode change applies instantly). |
| 4059 | // | 4212 | // |
| 4060 | // The logic that satisfies these behaviors is to check if *any* tile is fullscreen. | 4213 | // The logic that satisfies these behaviors is to check if *any* tile is fullscreen. |
| 4061 | - self.tiles.iter().any(|tile| tile.is_fullscreen()) | 4214 | + let mut any_fullscreen = false; |
| 4215 | + let mut any_maximized = false; | ||
| 4216 | + for tile in &self.tiles { | ||
| 4217 | + match tile.sizing_mode() { | ||
| 4218 | + SizingMode::Normal => (), | ||
| 4219 | + SizingMode::Maximized => any_maximized = true, | ||
| 4220 | + SizingMode::Fullscreen => any_fullscreen = true, | ||
| 4221 | + } | ||
| 4222 | + } | ||
| 4223 | + | ||
| 4224 | + if any_fullscreen { | ||
| 4225 | + SizingMode::Fullscreen | ||
| 4226 | + } else if any_maximized { | ||
| 4227 | + SizingMode::Maximized | ||
| 4228 | + } else { | ||
| 4229 | + SizingMode::Normal | ||
| 4230 | + } | ||
| 4062 | } | 4231 | } |
| 4063 | 4232 | ||
| 4064 | pub fn contains(&self, window: &W::Id) -> bool { | 4233 | pub fn contains(&self, window: &W::Id) -> bool { |
| @@ -4102,6 +4271,7 @@ impl<W: LayoutElement> Column<W> { | |||
| 4102 | 4271 | ||
| 4103 | if self.display_mode != ColumnDisplay::Tabbed { | 4272 | if self.display_mode != ColumnDisplay::Tabbed { |
| 4104 | self.is_pending_fullscreen = false; | 4273 | self.is_pending_fullscreen = false; |
| 4274 | + self.is_pending_maximized = false; | ||
| 4105 | } | 4275 | } |
| 4106 | 4276 | ||
| 4107 | self.data | 4277 | self.data |
| @@ -4213,7 +4383,8 @@ impl<W: LayoutElement> Column<W> { | |||
| 4213 | } | 4383 | } |
| 4214 | 4384 | ||
| 4215 | fn update_tile_sizes_with_transaction(&mut self, animate: bool, transaction: Transaction) { | 4385 | fn update_tile_sizes_with_transaction(&mut self, animate: bool, transaction: Transaction) { |
| 4216 | - if self.is_pending_fullscreen { | 4386 | + let sizing_mode = self.pending_sizing_mode(); |
| 4387 | + if matches!(sizing_mode, SizingMode::Fullscreen | SizingMode::Maximized) { | ||
| 4217 | for (tile_idx, tile) in self.tiles.iter_mut().enumerate() { | 4388 | for (tile_idx, tile) in self.tiles.iter_mut().enumerate() { |
| 4218 | // In tabbed mode, only the visible window participates in the transaction. | 4389 | // In tabbed mode, only the visible window participates in the transaction. |
| 4219 | let is_active = tile_idx == self.active_tile_idx; | 4390 | let is_active = tile_idx == self.active_tile_idx; |
| @@ -4223,7 +4394,11 @@ impl<W: LayoutElement> Column<W> { | |||
| 4223 | Some(transaction.clone()) | 4394 | Some(transaction.clone()) |
| 4224 | }; | 4395 | }; |
| 4225 | 4396 | ||
| 4226 | - tile.request_fullscreen(animate, transaction); | 4397 | + if matches!(sizing_mode, SizingMode::Fullscreen) { |
| 4398 | + tile.request_fullscreen(animate, transaction); | ||
| 4399 | + } else { | ||
| 4400 | + tile.request_maximized(self.parent_area.size, animate, transaction); | ||
| 4401 | + } | ||
| 4227 | } | 4402 | } |
| 4228 | return; | 4403 | return; |
| 4229 | } | 4404 | } |
| @@ -4510,7 +4685,7 @@ impl<W: LayoutElement> Column<W> { | |||
| 4510 | .map(NotNan::into_inner) | 4685 | .map(NotNan::into_inner) |
| 4511 | .unwrap(); | 4686 | .unwrap(); |
| 4512 | 4687 | ||
| 4513 | - if self.display_mode == ColumnDisplay::Tabbed && !self.is_fullscreen() { | 4688 | + if self.display_mode == ColumnDisplay::Tabbed && self.sizing_mode().is_normal() { |
| 4514 | let extra_size = self.tab_indicator.extra_size(self.tiles.len(), self.scale); | 4689 | let extra_size = self.tab_indicator.extra_size(self.tiles.len(), self.scale); |
| 4515 | tiles_width += extra_size.w; | 4690 | tiles_width += extra_size.w; |
| 4516 | } | 4691 | } |
| @@ -4875,6 +5050,19 @@ impl<W: LayoutElement> Column<W> { | |||
| 4875 | self.update_tile_sizes(true); | 5050 | self.update_tile_sizes(true); |
| 4876 | } | 5051 | } |
| 4877 | 5052 | ||
| 5053 | + fn set_maximized(&mut self, maximize: bool) { | ||
| 5054 | + if self.is_pending_maximized == maximize { | ||
| 5055 | + return; | ||
| 5056 | + } | ||
| 5057 | + | ||
| 5058 | + if maximize { | ||
| 5059 | + assert!(self.tiles.len() == 1 || self.display_mode == ColumnDisplay::Tabbed); | ||
| 5060 | + } | ||
| 5061 | + | ||
| 5062 | + self.is_pending_maximized = maximize; | ||
| 5063 | + self.update_tile_sizes(true); | ||
| 5064 | + } | ||
| 5065 | + | ||
| 4878 | fn set_column_display(&mut self, display: ColumnDisplay) { | 5066 | fn set_column_display(&mut self, display: ColumnDisplay) { |
| 4879 | if self.display_mode == display { | 5067 | if self.display_mode == display { |
| 4880 | return; | 5068 | return; |
| @@ -4936,8 +5124,13 @@ impl<W: LayoutElement> Column<W> { | |||
| 4936 | fn tiles_origin(&self) -> Point<f64, Logical> { | 5124 | fn tiles_origin(&self) -> Point<f64, Logical> { |
| 4937 | let mut origin = Point::from((0., 0.)); | 5125 | let mut origin = Point::from((0., 0.)); |
| 4938 | 5126 | ||
| 4939 | - if self.is_fullscreen() { | 5127 | + match self.sizing_mode() { |
| 4940 | - return origin; | 5128 | + SizingMode::Normal => (), |
| 5129 | + SizingMode::Maximized => { | ||
| 5130 | + origin.y += self.parent_area.loc.y; | ||
| 5131 | + return origin; | ||
| 5132 | + } | ||
| 5133 | + SizingMode::Fullscreen => return origin, | ||
| 4941 | } | 5134 | } |
| 4942 | 5135 | ||
| 4943 | origin.y += self.working_area.loc.y + self.options.layout.gaps; | 5136 | origin.y += self.working_area.loc.y + self.options.layout.gaps; |
| @@ -5096,7 +5289,7 @@ impl<W: LayoutElement> Column<W> { | |||
| 5096 | 5289 | ||
| 5097 | // Animate the appearance of the tab indicator. | 5290 | // Animate the appearance of the tab indicator. |
| 5098 | if self.display_mode == ColumnDisplay::Tabbed | 5291 | if self.display_mode == ColumnDisplay::Tabbed |
| 5099 | - && !self.is_fullscreen() | 5292 | + && self.sizing_mode().is_normal() |
| 5100 | && self.tiles.len() == 1 | 5293 | && self.tiles.len() == 1 |
| 5101 | && !self.tab_indicator.config().hide_when_single_tab | 5294 | && !self.tab_indicator.config().hide_when_single_tab |
| 5102 | { | 5295 | { |
| @@ -5119,7 +5312,7 @@ impl<W: LayoutElement> Column<W> { | |||
| 5119 | assert!(self.active_tile_idx < self.tiles.len()); | 5312 | assert!(self.active_tile_idx < self.tiles.len()); |
| 5120 | assert_eq!(self.tiles.len(), self.data.len()); | 5313 | assert_eq!(self.tiles.len(), self.data.len()); |
| 5121 | 5314 | ||
| 5122 | - if self.is_pending_fullscreen { | 5315 | + if !self.pending_sizing_mode().is_normal() { |
| 5123 | assert!(self.tiles.len() == 1 || self.display_mode == ColumnDisplay::Tabbed); | 5316 | assert!(self.tiles.len() == 1 || self.display_mode == ColumnDisplay::Tabbed); |
| 5124 | } | 5317 | } |
| 5125 | 5318 | ||
| @@ -5151,8 +5344,8 @@ impl<W: LayoutElement> Column<W> { | |||
| 5151 | assert_eq!(self.clock, tile.clock); | 5344 | assert_eq!(self.clock, tile.clock); |
| 5152 | assert_eq!(self.scale, tile.scale()); | 5345 | assert_eq!(self.scale, tile.scale()); |
| 5153 | assert_eq!( | 5346 | assert_eq!( |
| 5154 | - self.is_pending_fullscreen, | 5347 | + self.pending_sizing_mode(), |
| 5155 | - tile.window().is_pending_fullscreen() | 5348 | + tile.window().pending_sizing_mode() |
| 5156 | ); | 5349 | ); |
| 5157 | assert_eq!(self.view_size, tile.view_size()); | 5350 | assert_eq!(self.view_size, tile.view_size()); |
| 5158 | tile.verify_invariants(); | 5351 | tile.verify_invariants(); |
| @@ -5178,7 +5371,7 @@ impl<W: LayoutElement> Column<W> { | |||
| 5178 | tile.tile_height_for_window_height(f64::from(requested_size.h)); | 5371 | tile.tile_height_for_window_height(f64::from(requested_size.h)); |
| 5179 | let min_tile_height = f64::max(1., tile.min_size_nonfullscreen().h); | 5372 | let min_tile_height = f64::max(1., tile.min_size_nonfullscreen().h); |
| 5180 | 5373 | ||
| 5181 | - if !self.is_pending_fullscreen | 5374 | + if self.pending_sizing_mode().is_normal() |
| 5182 | && self.scale.round() == self.scale | 5375 | && self.scale.round() == self.scale |
| 5183 | && working_size.h.round() == working_size.h | 5376 | && working_size.h.round() == working_size.h |
| 5184 | && gaps.round() == gaps | 5377 | && gaps.round() == gaps |
src/layout/tests.rsmodified+142 -21
| @@ -33,9 +33,9 @@ struct TestWindowInner { | |||
| 33 | forced_size: Cell<Option<Size<i32, Logical>>>, | 33 | forced_size: Cell<Option<Size<i32, Logical>>>, |
| 34 | min_size: Size<i32, Logical>, | 34 | min_size: Size<i32, Logical>, |
| 35 | max_size: Size<i32, Logical>, | 35 | max_size: Size<i32, Logical>, |
| 36 | - pending_fullscreen: Cell<bool>, | 36 | + pending_sizing_mode: Cell<SizingMode>, |
| 37 | pending_activated: Cell<bool>, | 37 | pending_activated: Cell<bool>, |
| 38 | - is_fullscreen: Cell<bool>, | 38 | + sizing_mode: Cell<SizingMode>, |
| 39 | is_windowed_fullscreen: Cell<bool>, | 39 | is_windowed_fullscreen: Cell<bool>, |
| 40 | is_pending_windowed_fullscreen: Cell<bool>, | 40 | is_pending_windowed_fullscreen: Cell<bool>, |
| 41 | animate_next_configure: Cell<bool>, | 41 | animate_next_configure: Cell<bool>, |
| @@ -81,9 +81,9 @@ impl TestWindow { | |||
| 81 | forced_size: Cell::new(None), | 81 | forced_size: Cell::new(None), |
| 82 | min_size: params.min_max_size.0, | 82 | min_size: params.min_max_size.0, |
| 83 | max_size: params.min_max_size.1, | 83 | max_size: params.min_max_size.1, |
| 84 | - pending_fullscreen: Cell::new(false), | 84 | + pending_sizing_mode: Cell::new(SizingMode::Normal), |
| 85 | pending_activated: Cell::new(false), | 85 | pending_activated: Cell::new(false), |
| 86 | - is_fullscreen: Cell::new(false), | 86 | + sizing_mode: Cell::new(SizingMode::Normal), |
| 87 | is_windowed_fullscreen: Cell::new(false), | 87 | is_windowed_fullscreen: Cell::new(false), |
| 88 | is_pending_windowed_fullscreen: Cell::new(false), | 88 | is_pending_windowed_fullscreen: Cell::new(false), |
| 89 | animate_next_configure: Cell::new(false), | 89 | animate_next_configure: Cell::new(false), |
| @@ -126,8 +126,8 @@ impl TestWindow { | |||
| 126 | 126 | ||
| 127 | self.0.animate_next_configure.set(false); | 127 | self.0.animate_next_configure.set(false); |
| 128 | 128 | ||
| 129 | - if self.0.is_fullscreen.get() != self.0.pending_fullscreen.get() { | 129 | + if self.0.sizing_mode.get() != self.0.pending_sizing_mode.get() { |
| 130 | - self.0.is_fullscreen.set(self.0.pending_fullscreen.get()); | 130 | + self.0.sizing_mode.set(self.0.pending_sizing_mode.get()); |
| 131 | changed = true; | 131 | changed = true; |
| 132 | } | 132 | } |
| 133 | 133 | ||
| @@ -175,7 +175,7 @@ impl LayoutElement for TestWindow { | |||
| 175 | fn request_size( | 175 | fn request_size( |
| 176 | &mut self, | 176 | &mut self, |
| 177 | size: Size<i32, Logical>, | 177 | size: Size<i32, Logical>, |
| 178 | - is_fullscreen: bool, | 178 | + mode: SizingMode, |
| 179 | _animate: bool, | 179 | _animate: bool, |
| 180 | _transaction: Option<Transaction>, | 180 | _transaction: Option<Transaction>, |
| 181 | ) { | 181 | ) { |
| @@ -184,9 +184,9 @@ impl LayoutElement for TestWindow { | |||
| 184 | self.0.animate_next_configure.set(true); | 184 | self.0.animate_next_configure.set(true); |
| 185 | } | 185 | } |
| 186 | 186 | ||
| 187 | - self.0.pending_fullscreen.set(is_fullscreen); | 187 | + self.0.pending_sizing_mode.set(mode); |
| 188 | 188 | ||
| 189 | - if is_fullscreen { | 189 | + if mode.is_fullscreen() { |
| 190 | self.0.is_pending_windowed_fullscreen.set(false); | 190 | self.0.is_pending_windowed_fullscreen.set(false); |
| 191 | } | 191 | } |
| 192 | } | 192 | } |
| @@ -235,20 +235,12 @@ impl LayoutElement for TestWindow { | |||
| 235 | 235 | ||
| 236 | fn set_floating(&mut self, _floating: bool) {} | 236 | fn set_floating(&mut self, _floating: bool) {} |
| 237 | 237 | ||
| 238 | - fn is_fullscreen(&self) -> bool { | 238 | + fn sizing_mode(&self) -> SizingMode { |
| 239 | - if self.0.is_windowed_fullscreen.get() { | 239 | + self.0.sizing_mode.get() |
| 240 | - return false; | ||
| 241 | - } | ||
| 242 | - | ||
| 243 | - self.0.is_fullscreen.get() | ||
| 244 | } | 240 | } |
| 245 | 241 | ||
| 246 | - fn is_pending_fullscreen(&self) -> bool { | 242 | + fn pending_sizing_mode(&self) -> SizingMode { |
| 247 | - if self.0.is_pending_windowed_fullscreen.get() { | 243 | + self.0.pending_sizing_mode.get() |
| 248 | - return false; | ||
| 249 | - } | ||
| 250 | - | ||
| 251 | - self.0.pending_fullscreen.get() | ||
| 252 | } | 244 | } |
| 253 | 245 | ||
| 254 | fn requested_size(&self) -> Option<Size<i32, Logical>> { | 246 | fn requested_size(&self) -> Option<Size<i32, Logical>> { |
| @@ -585,6 +577,10 @@ enum Op { | |||
| 585 | id: Option<usize>, | 577 | id: Option<usize>, |
| 586 | }, | 578 | }, |
| 587 | MaximizeColumn, | 579 | MaximizeColumn, |
| 580 | + MaximizeWindowToEdges { | ||
| 581 | + #[proptest(strategy = "proptest::option::of(1..=5usize)")] | ||
| 582 | + id: Option<usize>, | ||
| 583 | + }, | ||
| 588 | SetColumnWidth(#[proptest(strategy = "arbitrary_size_change()")] SizeChange), | 584 | SetColumnWidth(#[proptest(strategy = "arbitrary_size_change()")] SizeChange), |
| 589 | SetWindowWidth { | 585 | SetWindowWidth { |
| 590 | #[proptest(strategy = "proptest::option::of(1..=5usize)")] | 586 | #[proptest(strategy = "proptest::option::of(1..=5usize)")] |
| @@ -1310,6 +1306,16 @@ impl Op { | |||
| 1310 | layout.toggle_window_height(id.as_ref(), false); | 1306 | layout.toggle_window_height(id.as_ref(), false); |
| 1311 | } | 1307 | } |
| 1312 | Op::MaximizeColumn => layout.toggle_full_width(), | 1308 | Op::MaximizeColumn => layout.toggle_full_width(), |
| 1309 | + Op::MaximizeWindowToEdges { id } => { | ||
| 1310 | + let id = id.or_else(|| layout.focus().map(|win| *win.id())); | ||
| 1311 | + let Some(id) = id else { | ||
| 1312 | + return; | ||
| 1313 | + }; | ||
| 1314 | + if !layout.has_window(&id) { | ||
| 1315 | + return; | ||
| 1316 | + } | ||
| 1317 | + layout.toggle_maximized(&id); | ||
| 1318 | + } | ||
| 1313 | Op::SetColumnWidth(change) => layout.set_column_width(change), | 1319 | Op::SetColumnWidth(change) => layout.set_column_width(change), |
| 1314 | Op::SetWindowWidth { id, change } => { | 1320 | Op::SetWindowWidth { id, change } => { |
| 1315 | let id = id.filter(|id| layout.has_window(id)); | 1321 | let id = id.filter(|id| layout.has_window(id)); |
| @@ -1674,6 +1680,9 @@ fn operations_dont_panic() { | |||
| 1674 | Op::FullscreenWindow(1), | 1680 | Op::FullscreenWindow(1), |
| 1675 | Op::FullscreenWindow(2), | 1681 | Op::FullscreenWindow(2), |
| 1676 | Op::FullscreenWindow(3), | 1682 | Op::FullscreenWindow(3), |
| 1683 | + Op::MaximizeWindowToEdges { id: Some(1) }, | ||
| 1684 | + Op::MaximizeWindowToEdges { id: Some(2) }, | ||
| 1685 | + Op::MaximizeWindowToEdges { id: Some(3) }, | ||
| 1677 | Op::FocusColumnLeft, | 1686 | Op::FocusColumnLeft, |
| 1678 | Op::FocusColumnRight, | 1687 | Op::FocusColumnRight, |
| 1679 | Op::FocusColumnRightOrFirst, | 1688 | Op::FocusColumnRightOrFirst, |
| @@ -1829,6 +1838,9 @@ fn operations_from_starting_state_dont_panic() { | |||
| 1829 | Op::FullscreenWindow(1), | 1838 | Op::FullscreenWindow(1), |
| 1830 | Op::FullscreenWindow(2), | 1839 | Op::FullscreenWindow(2), |
| 1831 | Op::FullscreenWindow(3), | 1840 | Op::FullscreenWindow(3), |
| 1841 | + Op::MaximizeWindowToEdges { id: Some(1) }, | ||
| 1842 | + Op::MaximizeWindowToEdges { id: Some(2) }, | ||
| 1843 | + Op::MaximizeWindowToEdges { id: Some(3) }, | ||
| 1832 | Op::SetFullscreenWindow { | 1844 | Op::SetFullscreenWindow { |
| 1833 | window: 1, | 1845 | window: 1, |
| 1834 | is_fullscreen: false, | 1846 | is_fullscreen: false, |
| @@ -3492,6 +3504,115 @@ fn move_column_to_workspace_focus_false_on_floating_window() { | |||
| 3492 | assert_eq!(monitors[0].active_workspace_idx, 0); | 3504 | assert_eq!(monitors[0].active_workspace_idx, 0); |
| 3493 | } | 3505 | } |
| 3494 | 3506 | ||
| 3507 | +#[test] | ||
| 3508 | +fn restore_to_floating_persists_across_fullscreen_maximize() { | ||
| 3509 | + let ops = [ | ||
| 3510 | + Op::AddOutput(1), | ||
| 3511 | + Op::AddWindow { | ||
| 3512 | + params: TestWindowParams::new(1), | ||
| 3513 | + }, | ||
| 3514 | + Op::ToggleWindowFloating { id: None }, | ||
| 3515 | + // Maximize then fullscreen. | ||
| 3516 | + Op::MaximizeWindowToEdges { id: None }, | ||
| 3517 | + Op::FullscreenWindow(1), | ||
| 3518 | + // Unfullscreen. | ||
| 3519 | + Op::FullscreenWindow(1), | ||
| 3520 | + ]; | ||
| 3521 | + | ||
| 3522 | + let mut layout = check_ops(ops); | ||
| 3523 | + | ||
| 3524 | + // Unfullscreening should return the window to the maximized state. | ||
| 3525 | + let scrolling = layout.active_workspace().unwrap().scrolling(); | ||
| 3526 | + assert!(scrolling.tiles().next().is_some()); | ||
| 3527 | + | ||
| 3528 | + let ops = [ | ||
| 3529 | + // Unmaximize. | ||
| 3530 | + Op::MaximizeWindowToEdges { id: None }, | ||
| 3531 | + ]; | ||
| 3532 | + check_ops_on_layout(&mut layout, ops); | ||
| 3533 | + | ||
| 3534 | + // Unmaximize should return the window back to floating. | ||
| 3535 | + let scrolling = layout.active_workspace().unwrap().scrolling(); | ||
| 3536 | + assert!(scrolling.tiles().next().is_none()); | ||
| 3537 | +} | ||
| 3538 | + | ||
| 3539 | +#[test] | ||
| 3540 | +fn unmaximize_during_fullscreen_does_not_float() { | ||
| 3541 | + let ops = [ | ||
| 3542 | + Op::AddOutput(1), | ||
| 3543 | + Op::AddWindow { | ||
| 3544 | + params: TestWindowParams::new(1), | ||
| 3545 | + }, | ||
| 3546 | + Op::ToggleWindowFloating { id: None }, | ||
| 3547 | + // Maximize then fullscreen. | ||
| 3548 | + Op::MaximizeWindowToEdges { id: None }, | ||
| 3549 | + Op::FullscreenWindow(1), | ||
| 3550 | + // Unmaximize. | ||
| 3551 | + Op::MaximizeWindowToEdges { id: None }, | ||
| 3552 | + ]; | ||
| 3553 | + | ||
| 3554 | + let mut layout = check_ops(ops); | ||
| 3555 | + | ||
| 3556 | + // Unmaximize shouldn't have changed the window state since it's fullscreen. | ||
| 3557 | + let scrolling = layout.active_workspace().unwrap().scrolling(); | ||
| 3558 | + assert!(scrolling.tiles().next().is_some()); | ||
| 3559 | + | ||
| 3560 | + let ops = [ | ||
| 3561 | + // Unfullscreen. | ||
| 3562 | + Op::FullscreenWindow(1), | ||
| 3563 | + ]; | ||
| 3564 | + check_ops_on_layout(&mut layout, ops); | ||
| 3565 | + | ||
| 3566 | + // Unfullscreen should return the window back to floating. | ||
| 3567 | + let scrolling = layout.active_workspace().unwrap().scrolling(); | ||
| 3568 | + assert!(scrolling.tiles().next().is_none()); | ||
| 3569 | +} | ||
| 3570 | + | ||
| 3571 | +#[test] | ||
| 3572 | +fn move_column_to_workspace_maximize_and_fullscreen() { | ||
| 3573 | + let ops = [ | ||
| 3574 | + Op::AddOutput(1), | ||
| 3575 | + Op::AddWindow { | ||
| 3576 | + params: TestWindowParams::new(1), | ||
| 3577 | + }, | ||
| 3578 | + Op::MaximizeWindowToEdges { id: None }, | ||
| 3579 | + Op::FullscreenWindow(1), | ||
| 3580 | + Op::MoveColumnToWorkspaceDown(true), | ||
| 3581 | + Op::FullscreenWindow(1), | ||
| 3582 | + ]; | ||
| 3583 | + | ||
| 3584 | + let layout = check_ops(ops); | ||
| 3585 | + let (_, win) = layout.windows().next().unwrap(); | ||
| 3586 | + | ||
| 3587 | + // Unfullscreening should return to maximized because the window was maximized before. | ||
| 3588 | + assert_eq!(win.pending_sizing_mode(), SizingMode::Maximized); | ||
| 3589 | +} | ||
| 3590 | + | ||
| 3591 | +#[test] | ||
| 3592 | +fn move_window_to_workspace_maximize_and_fullscreen() { | ||
| 3593 | + let ops = [ | ||
| 3594 | + Op::AddOutput(1), | ||
| 3595 | + Op::AddWindow { | ||
| 3596 | + params: TestWindowParams::new(1), | ||
| 3597 | + }, | ||
| 3598 | + Op::MaximizeWindowToEdges { id: None }, | ||
| 3599 | + Op::FullscreenWindow(1), | ||
| 3600 | + Op::MoveWindowToWorkspaceDown(true), | ||
| 3601 | + Op::FullscreenWindow(1), | ||
| 3602 | + ]; | ||
| 3603 | + | ||
| 3604 | + let layout = check_ops(ops); | ||
| 3605 | + let (_, win) = layout.windows().next().unwrap(); | ||
| 3606 | + | ||
| 3607 | + // Unfullscreening should return to maximized because the window was maximized before. | ||
| 3608 | + // | ||
| 3609 | + // FIXME: it currently doesn't because windows themselves can only be either fullscreen or | ||
| 3610 | + // maximized. So when a window is fullscreen, whether it is also maximized or not is stored in | ||
| 3611 | + // the column. MoveWindowToWorkspace removes the window from the column and this information is | ||
| 3612 | + // forgotten. | ||
| 3613 | + assert_eq!(win.pending_sizing_mode(), SizingMode::Normal); | ||
| 3614 | +} | ||
| 3615 | + | ||
| 3495 | fn parent_id_causes_loop(layout: &Layout<TestWindow>, id: usize, mut parent_id: usize) -> bool { | 3616 | fn parent_id_causes_loop(layout: &Layout<TestWindow>, id: usize, mut parent_id: usize) -> bool { |
| 3496 | if parent_id == id { | 3617 | if parent_id == id { |
| 3497 | return true; | 3618 | return true; |
src/layout/tile.rsmodified+124 -47
| @@ -16,6 +16,7 @@ use super::{ | |||
| 16 | SizeFrac, RESIZE_ANIMATION_THRESHOLD, | 16 | SizeFrac, RESIZE_ANIMATION_THRESHOLD, |
| 17 | }; | 17 | }; |
| 18 | use crate::animation::{Animation, Clock}; | 18 | use crate::animation::{Animation, Clock}; |
| 19 | +use crate::layout::SizingMode; | ||
| 19 | use crate::niri_render_elements; | 20 | use crate::niri_render_elements; |
| 20 | use crate::render_helpers::border::BorderRenderElement; | 21 | use crate::render_helpers::border::BorderRenderElement; |
| 21 | use crate::render_helpers::clipped_surface::{ClippedSurfaceRenderElement, RoundedCornerDamage}; | 22 | use crate::render_helpers::clipped_surface::{ClippedSurfaceRenderElement, RoundedCornerDamage}; |
| @@ -45,17 +46,17 @@ pub struct Tile<W: LayoutElement> { | |||
| 45 | /// The shadow around the window. | 46 | /// The shadow around the window. |
| 46 | shadow: Shadow, | 47 | shadow: Shadow, |
| 47 | 48 | ||
| 48 | - /// Whether this tile is fullscreen. | 49 | + /// This tile's current sizing mode. |
| 49 | /// | 50 | /// |
| 50 | - /// This will update only when the `window` actually goes fullscreen, rather than right away, | 51 | + /// This will update only when the `window` actually goes maximized or fullscreen, rather than |
| 51 | - /// to avoid black backdrop flicker before the window has had a chance to resize. | 52 | + /// right away, to avoid black backdrop flicker before the window has had a chance to resize. |
| 52 | - is_fullscreen: bool, | 53 | + sizing_mode: SizingMode, |
| 53 | 54 | ||
| 54 | /// The black backdrop for fullscreen windows. | 55 | /// The black backdrop for fullscreen windows. |
| 55 | fullscreen_backdrop: SolidColorBuffer, | 56 | fullscreen_backdrop: SolidColorBuffer, |
| 56 | 57 | ||
| 57 | /// Whether the tile should float upon unfullscreening. | 58 | /// Whether the tile should float upon unfullscreening. |
| 58 | - pub(super) unfullscreen_to_floating: bool, | 59 | + pub(super) restore_to_floating: bool, |
| 59 | 60 | ||
| 60 | /// The size that the window should assume when going floating. | 61 | /// The size that the window should assume when going floating. |
| 61 | /// | 62 | /// |
| @@ -146,6 +147,8 @@ struct ResizeAnimation { | |||
| 146 | // Note that this can be set even if this specific resize is between two non-fullscreen states, | 147 | // Note that this can be set even if this specific resize is between two non-fullscreen states, |
| 147 | // for example when issuing a new resize during an unfullscreen resize. | 148 | // for example when issuing a new resize during an unfullscreen resize. |
| 148 | fullscreen_progress: Option<Animation>, | 149 | fullscreen_progress: Option<Animation>, |
| 150 | + // Similar to above but for fullscreen-or-maximized. | ||
| 151 | + expanded_progress: Option<Animation>, | ||
| 149 | } | 152 | } |
| 150 | 153 | ||
| 151 | #[derive(Debug)] | 154 | #[derive(Debug)] |
| @@ -178,16 +181,16 @@ impl<W: LayoutElement> Tile<W> { | |||
| 178 | let border_config = options.layout.border.merged_with(&rules.border); | 181 | let border_config = options.layout.border.merged_with(&rules.border); |
| 179 | let focus_ring_config = options.layout.focus_ring.merged_with(&rules.focus_ring); | 182 | let focus_ring_config = options.layout.focus_ring.merged_with(&rules.focus_ring); |
| 180 | let shadow_config = options.layout.shadow.merged_with(&rules.shadow); | 183 | let shadow_config = options.layout.shadow.merged_with(&rules.shadow); |
| 181 | - let is_fullscreen = window.is_fullscreen(); | 184 | + let sizing_mode = window.sizing_mode(); |
| 182 | 185 | ||
| 183 | Self { | 186 | Self { |
| 184 | window, | 187 | window, |
| 185 | border: FocusRing::new(border_config.into()), | 188 | border: FocusRing::new(border_config.into()), |
| 186 | focus_ring: FocusRing::new(focus_ring_config), | 189 | focus_ring: FocusRing::new(focus_ring_config), |
| 187 | shadow: Shadow::new(shadow_config), | 190 | shadow: Shadow::new(shadow_config), |
| 188 | - is_fullscreen, | 191 | + sizing_mode, |
| 189 | fullscreen_backdrop: SolidColorBuffer::new((0., 0.), [0., 0., 0., 1.]), | 192 | fullscreen_backdrop: SolidColorBuffer::new((0., 0.), [0., 0., 0., 1.]), |
| 190 | - unfullscreen_to_floating: false, | 193 | + restore_to_floating: false, |
| 191 | floating_window_size: None, | 194 | floating_window_size: None, |
| 192 | floating_pos: None, | 195 | floating_pos: None, |
| 193 | floating_preset_width_idx: None, | 196 | floating_preset_width_idx: None, |
| @@ -248,8 +251,8 @@ impl<W: LayoutElement> Tile<W> { | |||
| 248 | } | 251 | } |
| 249 | 252 | ||
| 250 | pub fn update_window(&mut self) { | 253 | pub fn update_window(&mut self) { |
| 251 | - let was_fullscreen = self.is_fullscreen; | 254 | + let prev_sizing_mode = self.sizing_mode; |
| 252 | - self.is_fullscreen = self.window.is_fullscreen(); | 255 | + self.sizing_mode = self.window.sizing_mode(); |
| 253 | 256 | ||
| 254 | if let Some(animate_from) = self.window.take_animation_snapshot() { | 257 | if let Some(animate_from) = self.window.take_animation_snapshot() { |
| 255 | let params = if let Some(resize) = self.resize_animation.take() { | 258 | let params = if let Some(resize) = self.resize_animation.take() { |
| @@ -265,10 +268,10 @@ impl<W: LayoutElement> Tile<W> { | |||
| 265 | size.h = size_from.h + (size.h - size_from.h) * val; | 268 | size.h = size_from.h + (size.h - size_from.h) * val; |
| 266 | 269 | ||
| 267 | let mut tile_size = animate_from.size; | 270 | let mut tile_size = animate_from.size; |
| 268 | - if was_fullscreen { | 271 | + if prev_sizing_mode.is_fullscreen() { |
| 269 | tile_size.w = f64::max(tile_size.w, self.view_size.w); | 272 | tile_size.w = f64::max(tile_size.w, self.view_size.w); |
| 270 | tile_size.h = f64::max(tile_size.h, self.view_size.h); | 273 | tile_size.h = f64::max(tile_size.h, self.view_size.h); |
| 271 | - } else if !self.border.is_off() { | 274 | + } else if prev_sizing_mode.is_normal() && !self.border.is_off() { |
| 272 | let width = self.border.width(); | 275 | let width = self.border.width(); |
| 273 | tile_size.w += width * 2.; | 276 | tile_size.w += width * 2.; |
| 274 | tile_size.h += width * 2.; | 277 | tile_size.h += width * 2.; |
| @@ -280,29 +283,56 @@ impl<W: LayoutElement> Tile<W> { | |||
| 280 | let fullscreen_from = resize | 283 | let fullscreen_from = resize |
| 281 | .fullscreen_progress | 284 | .fullscreen_progress |
| 282 | .map(|anim| anim.clamped_value().clamp(0., 1.)) | 285 | .map(|anim| anim.clamped_value().clamp(0., 1.)) |
| 283 | - .unwrap_or(if was_fullscreen { 1. } else { 0. }); | 286 | + .unwrap_or(if prev_sizing_mode.is_fullscreen() { |
| 287 | + 1. | ||
| 288 | + } else { | ||
| 289 | + 0. | ||
| 290 | + }); | ||
| 291 | + | ||
| 292 | + let expanded_from = resize | ||
| 293 | + .expanded_progress | ||
| 294 | + .map(|anim| anim.clamped_value().clamp(0., 1.)) | ||
| 295 | + .unwrap_or(if prev_sizing_mode.is_normal() { 0. } else { 1. }); | ||
| 284 | 296 | ||
| 285 | // Also try to reuse the existing offscreen buffer if we have one. | 297 | // Also try to reuse the existing offscreen buffer if we have one. |
| 286 | - (size, tile_size, fullscreen_from, resize.offscreen) | 298 | + ( |
| 299 | + size, | ||
| 300 | + tile_size, | ||
| 301 | + fullscreen_from, | ||
| 302 | + expanded_from, | ||
| 303 | + resize.offscreen, | ||
| 304 | + ) | ||
| 287 | } else { | 305 | } else { |
| 288 | let size = animate_from.size; | 306 | let size = animate_from.size; |
| 289 | 307 | ||
| 290 | // Compute like in tile_size(). | 308 | // Compute like in tile_size(). |
| 291 | let mut tile_size = size; | 309 | let mut tile_size = size; |
| 292 | - if was_fullscreen { | 310 | + if prev_sizing_mode.is_fullscreen() { |
| 293 | tile_size.w = f64::max(tile_size.w, self.view_size.w); | 311 | tile_size.w = f64::max(tile_size.w, self.view_size.w); |
| 294 | tile_size.h = f64::max(tile_size.h, self.view_size.h); | 312 | tile_size.h = f64::max(tile_size.h, self.view_size.h); |
| 295 | - } else if !self.border.is_off() { | 313 | + } else if prev_sizing_mode.is_normal() && !self.border.is_off() { |
| 296 | let width = self.border.width(); | 314 | let width = self.border.width(); |
| 297 | tile_size.w += width * 2.; | 315 | tile_size.w += width * 2.; |
| 298 | tile_size.h += width * 2.; | 316 | tile_size.h += width * 2.; |
| 299 | } | 317 | } |
| 300 | 318 | ||
| 301 | - let fullscreen_from = if was_fullscreen { 1. } else { 0. }; | 319 | + let fullscreen_from = if prev_sizing_mode.is_fullscreen() { |
| 320 | + 1. | ||
| 321 | + } else { | ||
| 322 | + 0. | ||
| 323 | + }; | ||
| 324 | + | ||
| 325 | + let expanded_from = if prev_sizing_mode.is_normal() { 0. } else { 1. }; | ||
| 302 | 326 | ||
| 303 | - (size, tile_size, fullscreen_from, OffscreenBuffer::default()) | 327 | + ( |
| 328 | + size, | ||
| 329 | + tile_size, | ||
| 330 | + fullscreen_from, | ||
| 331 | + expanded_from, | ||
| 332 | + OffscreenBuffer::default(), | ||
| 333 | + ) | ||
| 304 | }; | 334 | }; |
| 305 | - let (size_from, tile_size_from, fullscreen_from, offscreen) = params; | 335 | + let (size_from, tile_size_from, fullscreen_from, expanded_from, offscreen) = params; |
| 306 | 336 | ||
| 307 | let change = self.window.size().to_f64().to_point() - size_from.to_point(); | 337 | let change = self.window.size().to_f64().to_point() - size_from.to_point(); |
| 308 | let change = f64::max(change.x.abs(), change.y.abs()); | 338 | let change = f64::max(change.x.abs(), change.y.abs()); |
| @@ -318,9 +348,16 @@ impl<W: LayoutElement> Tile<W> { | |||
| 318 | self.options.animations.window_resize.anim, | 348 | self.options.animations.window_resize.anim, |
| 319 | ); | 349 | ); |
| 320 | 350 | ||
| 321 | - let fullscreen_to = if self.is_fullscreen { 1. } else { 0. }; | 351 | + let fullscreen_to = if self.sizing_mode.is_fullscreen() { |
| 352 | + 1. | ||
| 353 | + } else { | ||
| 354 | + 0. | ||
| 355 | + }; | ||
| 356 | + let expanded_to = if self.sizing_mode.is_normal() { 0. } else { 1. }; | ||
| 322 | let fullscreen_progress = (fullscreen_from != fullscreen_to) | 357 | let fullscreen_progress = (fullscreen_from != fullscreen_to) |
| 323 | .then(|| anim.restarted(fullscreen_from, fullscreen_to, 0.)); | 358 | .then(|| anim.restarted(fullscreen_from, fullscreen_to, 0.)); |
| 359 | + let expanded_progress = (expanded_from != expanded_to) | ||
| 360 | + .then(|| anim.restarted(expanded_from, expanded_to, 0.)); | ||
| 324 | 361 | ||
| 325 | self.resize_animation = Some(ResizeAnimation { | 362 | self.resize_animation = Some(ResizeAnimation { |
| 326 | anim, | 363 | anim, |
| @@ -329,6 +366,7 @@ impl<W: LayoutElement> Tile<W> { | |||
| 329 | offscreen, | 366 | offscreen, |
| 330 | tile_size_from, | 367 | tile_size_from, |
| 331 | fullscreen_progress, | 368 | fullscreen_progress, |
| 369 | + expanded_progress, | ||
| 332 | }); | 370 | }); |
| 333 | } else { | 371 | } else { |
| 334 | self.resize_animation = None; | 372 | self.resize_animation = None; |
| @@ -406,7 +444,7 @@ impl<W: LayoutElement> Tile<W> { | |||
| 406 | pub fn update_render_elements(&mut self, is_active: bool, view_rect: Rectangle<f64, Logical>) { | 444 | pub fn update_render_elements(&mut self, is_active: bool, view_rect: Rectangle<f64, Logical>) { |
| 407 | let rules = self.window.rules(); | 445 | let rules = self.window.rules(); |
| 408 | let animated_tile_size = self.animated_tile_size(); | 446 | let animated_tile_size = self.animated_tile_size(); |
| 409 | - let fullscreen_progress = self.fullscreen_progress(); | 447 | + let expanded_progress = self.expanded_progress(); |
| 410 | 448 | ||
| 411 | let draw_border_with_background = rules | 449 | let draw_border_with_background = rules |
| 412 | .draw_border_with_background | 450 | .draw_border_with_background |
| @@ -425,7 +463,7 @@ impl<W: LayoutElement> Tile<W> { | |||
| 425 | .map_or(CornerRadius::default(), |radius| { | 463 | .map_or(CornerRadius::default(), |radius| { |
| 426 | radius.expanded_by(border_width as f32) | 464 | radius.expanded_by(border_width as f32) |
| 427 | }) | 465 | }) |
| 428 | - .scaled_by(1. - fullscreen_progress as f32); | 466 | + .scaled_by(1. - expanded_progress as f32); |
| 429 | self.border.update_render_elements( | 467 | self.border.update_render_elements( |
| 430 | border_window_size, | 468 | border_window_size, |
| 431 | is_active, | 469 | is_active, |
| @@ -437,7 +475,7 @@ impl<W: LayoutElement> Tile<W> { | |||
| 437 | ), | 475 | ), |
| 438 | radius, | 476 | radius, |
| 439 | self.scale, | 477 | self.scale, |
| 440 | - 1. - fullscreen_progress as f32, | 478 | + 1. - expanded_progress as f32, |
| 441 | ); | 479 | ); |
| 442 | 480 | ||
| 443 | let radius = if self.visual_border_width().is_some() { | 481 | let radius = if self.visual_border_width().is_some() { |
| @@ -446,17 +484,17 @@ impl<W: LayoutElement> Tile<W> { | |||
| 446 | rules | 484 | rules |
| 447 | .geometry_corner_radius | 485 | .geometry_corner_radius |
| 448 | .unwrap_or_default() | 486 | .unwrap_or_default() |
| 449 | - .scaled_by(1. - fullscreen_progress as f32) | 487 | + .scaled_by(1. - expanded_progress as f32) |
| 450 | }; | 488 | }; |
| 451 | self.shadow.update_render_elements( | 489 | self.shadow.update_render_elements( |
| 452 | animated_tile_size, | 490 | animated_tile_size, |
| 453 | is_active, | 491 | is_active, |
| 454 | radius, | 492 | radius, |
| 455 | self.scale, | 493 | self.scale, |
| 456 | - 1. - fullscreen_progress as f32, | 494 | + 1. - expanded_progress as f32, |
| 457 | ); | 495 | ); |
| 458 | 496 | ||
| 459 | - let draw_focus_ring_with_background = if self.border.is_off() && fullscreen_progress < 1. { | 497 | + let draw_focus_ring_with_background = if self.border.is_off() { |
| 460 | draw_border_with_background | 498 | draw_border_with_background |
| 461 | } else { | 499 | } else { |
| 462 | false | 500 | false |
| @@ -470,7 +508,7 @@ impl<W: LayoutElement> Tile<W> { | |||
| 470 | view_rect, | 508 | view_rect, |
| 471 | radius, | 509 | radius, |
| 472 | self.scale, | 510 | self.scale, |
| 473 | - 1. - fullscreen_progress as f32, | 511 | + 1. - expanded_progress as f32, |
| 474 | ); | 512 | ); |
| 475 | 513 | ||
| 476 | self.fullscreen_backdrop.resize(animated_tile_size); | 514 | self.fullscreen_backdrop.resize(animated_tile_size); |
| @@ -609,8 +647,8 @@ impl<W: LayoutElement> Tile<W> { | |||
| 609 | &mut self.window | 647 | &mut self.window |
| 610 | } | 648 | } |
| 611 | 649 | ||
| 612 | - pub fn is_fullscreen(&self) -> bool { | 650 | + pub fn sizing_mode(&self) -> SizingMode { |
| 613 | - self.is_fullscreen | 651 | + self.sizing_mode |
| 614 | } | 652 | } |
| 615 | 653 | ||
| 616 | fn fullscreen_progress(&self) -> f64 { | 654 | fn fullscreen_progress(&self) -> f64 { |
| @@ -620,16 +658,30 @@ impl<W: LayoutElement> Tile<W> { | |||
| 620 | } | 658 | } |
| 621 | } | 659 | } |
| 622 | 660 | ||
| 623 | - if self.is_fullscreen { | 661 | + if self.sizing_mode.is_fullscreen() { |
| 624 | 1. | 662 | 1. |
| 625 | } else { | 663 | } else { |
| 626 | 0. | 664 | 0. |
| 627 | } | 665 | } |
| 628 | } | 666 | } |
| 629 | 667 | ||
| 668 | + fn expanded_progress(&self) -> f64 { | ||
| 669 | + if let Some(resize) = &self.resize_animation { | ||
| 670 | + if let Some(anim) = &resize.expanded_progress { | ||
| 671 | + return anim.clamped_value().clamp(0., 1.); | ||
| 672 | + } | ||
| 673 | + } | ||
| 674 | + | ||
| 675 | + if self.sizing_mode.is_normal() { | ||
| 676 | + 0. | ||
| 677 | + } else { | ||
| 678 | + 1. | ||
| 679 | + } | ||
| 680 | + } | ||
| 681 | + | ||
| 630 | /// Returns `None` if the border is hidden and `Some(width)` if it should be shown. | 682 | /// Returns `None` if the border is hidden and `Some(width)` if it should be shown. |
| 631 | pub fn effective_border_width(&self) -> Option<f64> { | 683 | pub fn effective_border_width(&self) -> Option<f64> { |
| 632 | - if self.is_fullscreen { | 684 | + if !self.sizing_mode.is_normal() { |
| 633 | return None; | 685 | return None; |
| 634 | } | 686 | } |
| 635 | 687 | ||
| @@ -645,10 +697,10 @@ impl<W: LayoutElement> Tile<W> { | |||
| 645 | return None; | 697 | return None; |
| 646 | } | 698 | } |
| 647 | 699 | ||
| 648 | - let fullscreen_progress = self.fullscreen_progress(); | 700 | + let expanded_progress = self.expanded_progress(); |
| 649 | 701 | ||
| 650 | - // Only hide the border when fully fullscreen to avoid jarring border appearance. | 702 | + // Only hide the border when fully expanded to avoid jarring border appearance. |
| 651 | - if fullscreen_progress == 1. { | 703 | + if expanded_progress == 1. { |
| 652 | return None; | 704 | return None; |
| 653 | } | 705 | } |
| 654 | 706 | ||
| @@ -688,7 +740,7 @@ impl<W: LayoutElement> Tile<W> { | |||
| 688 | pub fn tile_size(&self) -> Size<f64, Logical> { | 740 | pub fn tile_size(&self) -> Size<f64, Logical> { |
| 689 | let mut size = self.window_size(); | 741 | let mut size = self.window_size(); |
| 690 | 742 | ||
| 691 | - if self.is_fullscreen { | 743 | + if self.sizing_mode.is_fullscreen() { |
| 692 | // Normally we'd just return the fullscreen size here, but this makes things a bit | 744 | // Normally we'd just return the fullscreen size here, but this makes things a bit |
| 693 | // nicer if a fullscreen window is bigger than the fullscreen size for some reason. | 745 | // nicer if a fullscreen window is bigger than the fullscreen size for some reason. |
| 694 | size.w = f64::max(size.w, self.view_size.w); | 746 | size.w = f64::max(size.w, self.view_size.w); |
| @@ -707,7 +759,7 @@ impl<W: LayoutElement> Tile<W> { | |||
| 707 | pub fn tile_expected_or_current_size(&self) -> Size<f64, Logical> { | 759 | pub fn tile_expected_or_current_size(&self) -> Size<f64, Logical> { |
| 708 | let mut size = self.window_expected_or_current_size(); | 760 | let mut size = self.window_expected_or_current_size(); |
| 709 | 761 | ||
| 710 | - if self.is_fullscreen { | 762 | + if self.sizing_mode.is_fullscreen() { |
| 711 | // Normally we'd just return the fullscreen size here, but this makes things a bit | 763 | // Normally we'd just return the fullscreen size here, but this makes things a bit |
| 712 | // nicer if a fullscreen window is bigger than the fullscreen size for some reason. | 764 | // nicer if a fullscreen window is bigger than the fullscreen size for some reason. |
| 713 | size.w = f64::max(size.w, self.view_size.w); | 765 | size.w = f64::max(size.w, self.view_size.w); |
| @@ -836,8 +888,12 @@ impl<W: LayoutElement> Tile<W> { | |||
| 836 | // The size request has to be i32 unfortunately, due to Wayland. We floor here instead of | 888 | // The size request has to be i32 unfortunately, due to Wayland. We floor here instead of |
| 837 | // round to avoid situations where proportionally-sized columns don't fit on the screen | 889 | // round to avoid situations where proportionally-sized columns don't fit on the screen |
| 838 | // exactly. | 890 | // exactly. |
| 839 | - self.window | 891 | + self.window.request_size( |
| 840 | - .request_size(size.to_i32_floor(), false, animate, transaction); | 892 | + size.to_i32_floor(), |
| 893 | + SizingMode::Normal, | ||
| 894 | + animate, | ||
| 895 | + transaction, | ||
| 896 | + ); | ||
| 841 | } | 897 | } |
| 842 | 898 | ||
| 843 | pub fn tile_width_for_window_width(&self, size: f64) -> f64 { | 899 | pub fn tile_width_for_window_width(&self, size: f64) -> f64 { |
| @@ -872,9 +928,27 @@ impl<W: LayoutElement> Tile<W> { | |||
| 872 | } | 928 | } |
| 873 | } | 929 | } |
| 874 | 930 | ||
| 931 | + pub fn request_maximized( | ||
| 932 | + &mut self, | ||
| 933 | + size: Size<f64, Logical>, | ||
| 934 | + animate: bool, | ||
| 935 | + transaction: Option<Transaction>, | ||
| 936 | + ) { | ||
| 937 | + self.window.request_size( | ||
| 938 | + size.to_i32_round(), | ||
| 939 | + SizingMode::Maximized, | ||
| 940 | + animate, | ||
| 941 | + transaction, | ||
| 942 | + ); | ||
| 943 | + } | ||
| 944 | + | ||
| 875 | pub fn request_fullscreen(&mut self, animate: bool, transaction: Option<Transaction>) { | 945 | pub fn request_fullscreen(&mut self, animate: bool, transaction: Option<Transaction>) { |
| 876 | - self.window | 946 | + self.window.request_size( |
| 877 | - .request_size(self.view_size.to_i32_round(), true, animate, transaction); | 947 | + self.view_size.to_i32_round(), |
| 948 | + SizingMode::Fullscreen, | ||
| 949 | + animate, | ||
| 950 | + transaction, | ||
| 951 | + ); | ||
| 878 | } | 952 | } |
| 879 | 953 | ||
| 880 | pub fn min_size_nonfullscreen(&self) -> Size<f64, Logical> { | 954 | pub fn min_size_nonfullscreen(&self) -> Size<f64, Logical> { |
| @@ -933,6 +1007,7 @@ impl<W: LayoutElement> Tile<W> { | |||
| 933 | 1007 | ||
| 934 | let scale = Scale::from(self.scale); | 1008 | let scale = Scale::from(self.scale); |
| 935 | let fullscreen_progress = self.fullscreen_progress(); | 1009 | let fullscreen_progress = self.fullscreen_progress(); |
| 1010 | + let expanded_progress = self.expanded_progress(); | ||
| 936 | 1011 | ||
| 937 | let win_alpha = if self.window.is_ignoring_opacity_window_rule() { | 1012 | let win_alpha = if self.window.is_ignoring_opacity_window_rule() { |
| 938 | 1. | 1013 | 1. |
| @@ -968,7 +1043,7 @@ impl<W: LayoutElement> Tile<W> { | |||
| 968 | let radius = rules | 1043 | let radius = rules |
| 969 | .geometry_corner_radius | 1044 | .geometry_corner_radius |
| 970 | .unwrap_or_default() | 1045 | .unwrap_or_default() |
| 971 | - .scaled_by(1. - fullscreen_progress as f32); | 1046 | + .scaled_by(1. - expanded_progress as f32); |
| 972 | 1047 | ||
| 973 | // If we're resizing, try to render a shader, or a fallback. | 1048 | // If we're resizing, try to render a shader, or a fallback. |
| 974 | let mut resize_shader = None; | 1049 | let mut resize_shader = None; |
| @@ -1153,7 +1228,7 @@ impl<W: LayoutElement> Tile<W> { | |||
| 1153 | .map_or(CornerRadius::default(), |radius| { | 1228 | .map_or(CornerRadius::default(), |radius| { |
| 1154 | radius.expanded_by(border_width as f32) | 1229 | radius.expanded_by(border_width as f32) |
| 1155 | }) | 1230 | }) |
| 1156 | - .scaled_by(1. - fullscreen_progress as f32); | 1231 | + .scaled_by(1. - expanded_progress as f32); |
| 1157 | 1232 | ||
| 1158 | let size = self.fullscreen_backdrop.size(); | 1233 | let size = self.fullscreen_backdrop.size(); |
| 1159 | let color = self.fullscreen_backdrop.color(); | 1234 | let color = self.fullscreen_backdrop.color(); |
| @@ -1191,13 +1266,15 @@ impl<W: LayoutElement> Tile<W> { | |||
| 1191 | }); | 1266 | }); |
| 1192 | let rv = rv.chain(elem.into_iter().flatten()); | 1267 | let rv = rv.chain(elem.into_iter().flatten()); |
| 1193 | 1268 | ||
| 1194 | - // Hide the focus ring when fullscreened. It's not normally visible anyway due to being | 1269 | + // Hide the focus ring when maximized/fullscreened. It's not normally visible anyway due to |
| 1195 | - // outside the monitor, but it is visible in the overview (which is a bit weird). | 1270 | + // being outside the monitor or obscured by a solid colored bar, but it is visible under |
| 1196 | - let elem = (focus_ring && fullscreen_progress < 1.) | 1271 | + // semitransparent bars in maximized state (which is a bit weird) and in the overview (also |
| 1272 | + // a bit weird). | ||
| 1273 | + let elem = (focus_ring && expanded_progress < 1.) | ||
| 1197 | .then(|| self.focus_ring.render(renderer, location).map(Into::into)); | 1274 | .then(|| self.focus_ring.render(renderer, location).map(Into::into)); |
| 1198 | let rv = rv.chain(elem.into_iter().flatten()); | 1275 | let rv = rv.chain(elem.into_iter().flatten()); |
| 1199 | 1276 | ||
| 1200 | - let elem = (fullscreen_progress < 1.) | 1277 | + let elem = (expanded_progress < 1.) |
| 1201 | .then(|| self.shadow.render(renderer, location).map(Into::into)); | 1278 | .then(|| self.shadow.render(renderer, location).map(Into::into)); |
| 1202 | rv.chain(elem.into_iter().flatten()) | 1279 | rv.chain(elem.into_iter().flatten()) |
| 1203 | } | 1280 | } |
| @@ -1328,7 +1405,7 @@ impl<W: LayoutElement> Tile<W> { | |||
| 1328 | pub fn verify_invariants(&self) { | 1405 | pub fn verify_invariants(&self) { |
| 1329 | use approx::assert_abs_diff_eq; | 1406 | use approx::assert_abs_diff_eq; |
| 1330 | 1407 | ||
| 1331 | - assert_eq!(self.is_fullscreen, self.window.is_fullscreen()); | 1408 | + assert_eq!(self.sizing_mode, self.window.sizing_mode()); |
| 1332 | 1409 | ||
| 1333 | let scale = self.scale; | 1410 | let scale = self.scale; |
| 1334 | let size = self.tile_size(); | 1411 | let size = self.tile_size(); |
src/layout/workspace.rsmodified+106 -25
| @@ -611,16 +611,16 @@ impl<W: LayoutElement> Workspace<W> { | |||
| 611 | is_floating: bool, | 611 | is_floating: bool, |
| 612 | ) { | 612 | ) { |
| 613 | self.enter_output_for_window(tile.window()); | 613 | self.enter_output_for_window(tile.window()); |
| 614 | - tile.unfullscreen_to_floating = is_floating; | 614 | + tile.restore_to_floating = is_floating; |
| 615 | 615 | ||
| 616 | match target { | 616 | match target { |
| 617 | WorkspaceAddWindowTarget::Auto => { | 617 | WorkspaceAddWindowTarget::Auto => { |
| 618 | // Don't steal focus from an active fullscreen window. | 618 | // Don't steal focus from an active fullscreen window. |
| 619 | let activate = activate.map_smart(|| !self.is_active_pending_fullscreen()); | 619 | let activate = activate.map_smart(|| !self.is_active_pending_fullscreen()); |
| 620 | 620 | ||
| 621 | - // If the tile is pending fullscreen, open it in the scrolling layout where it can | 621 | + // If the tile is pending maximized or fullscreen, open it in the scrolling layout |
| 622 | - // go fullscreen. | 622 | + // where it can do that. |
| 623 | - if is_floating && !tile.window().is_pending_fullscreen() { | 623 | + if is_floating && tile.window().pending_sizing_mode().is_normal() { |
| 624 | self.floating.add_tile(tile, activate); | 624 | self.floating.add_tile(tile, activate); |
| 625 | 625 | ||
| 626 | if activate || self.scrolling.is_empty() { | 626 | if activate || self.scrolling.is_empty() { |
| @@ -649,7 +649,7 @@ impl<W: LayoutElement> Workspace<W> { | |||
| 649 | 649 | ||
| 650 | let floating_has_window = self.floating.has_window(next_to); | 650 | let floating_has_window = self.floating.has_window(next_to); |
| 651 | 651 | ||
| 652 | - if is_floating && !tile.window().is_pending_fullscreen() { | 652 | + if is_floating && tile.window().pending_sizing_mode().is_normal() { |
| 653 | if floating_has_window { | 653 | if floating_has_window { |
| 654 | self.floating.add_tile_above(next_to, tile, activate); | 654 | self.floating.add_tile_above(next_to, tile, activate); |
| 655 | } else { | 655 | } else { |
| @@ -869,6 +869,8 @@ impl<W: LayoutElement> Workspace<W> { | |||
| 869 | toplevel.with_pending_state(|state| { | 869 | toplevel.with_pending_state(|state| { |
| 870 | if state.states.contains(xdg_toplevel::State::Fullscreen) { | 870 | if state.states.contains(xdg_toplevel::State::Fullscreen) { |
| 871 | state.size = Some(self.view_size.to_i32_round()); | 871 | state.size = Some(self.view_size.to_i32_round()); |
| 872 | + } else if state.states.contains(xdg_toplevel::State::Maximized) { | ||
| 873 | + state.size = Some(self.working_area.size.to_i32_round()); | ||
| 872 | } else { | 874 | } else { |
| 873 | let size = | 875 | let size = |
| 874 | self.new_window_size(width, height, is_floating, rules, (min_size, max_size)); | 876 | self.new_window_size(width, height, is_floating, rules, (min_size, max_size)); |
| @@ -1257,10 +1259,10 @@ impl<W: LayoutElement> Workspace<W> { | |||
| 1257 | } | 1259 | } |
| 1258 | 1260 | ||
| 1259 | pub fn set_fullscreen(&mut self, window: &W::Id, is_fullscreen: bool) { | 1261 | pub fn set_fullscreen(&mut self, window: &W::Id, is_fullscreen: bool) { |
| 1260 | - let mut unfullscreen_to_floating = false; | 1262 | + let mut restore_to_floating = false; |
| 1261 | if self.floating.has_window(window) { | 1263 | if self.floating.has_window(window) { |
| 1262 | if is_fullscreen { | 1264 | if is_fullscreen { |
| 1263 | - unfullscreen_to_floating = true; | 1265 | + restore_to_floating = true; |
| 1264 | self.toggle_window_floating(Some(window)); | 1266 | self.toggle_window_floating(Some(window)); |
| 1265 | } else { | 1267 | } else { |
| 1266 | // Floating windows are never fullscreen, so this is an unfullscreen request for an | 1268 | // Floating windows are never fullscreen, so this is an unfullscreen request for an |
| @@ -1271,30 +1273,44 @@ impl<W: LayoutElement> Workspace<W> { | |||
| 1271 | // The window is in the scrolling layout and we're requesting an unfullscreen. If it is | 1273 | // The window is in the scrolling layout and we're requesting an unfullscreen. If it is |
| 1272 | // indeed fullscreen (i.e. this isn't a duplicate unfullscreen request), then we may | 1274 | // indeed fullscreen (i.e. this isn't a duplicate unfullscreen request), then we may |
| 1273 | // need to unfullscreen into floating. | 1275 | // need to unfullscreen into floating. |
| 1274 | - let tile = self | 1276 | + let col = self |
| 1275 | .scrolling | 1277 | .scrolling |
| 1276 | - .tiles() | 1278 | + .columns() |
| 1277 | - .find(|tile| tile.window().id() == window) | 1279 | + .find(|col| col.contains(window)) |
| 1278 | .unwrap(); | 1280 | .unwrap(); |
| 1279 | - if tile.window().is_pending_fullscreen() && tile.unfullscreen_to_floating { | 1281 | + |
| 1280 | - // Unfullscreen and float in one call so it has a chance to notice and request a | 1282 | + // When going from fullscreen to maximized, don't consider restore_to_floating yet. |
| 1281 | - // (0, 0) size, rather than the scrolling column size. | 1283 | + if col.is_pending_fullscreen() && !col.is_pending_maximized() { |
| 1282 | - self.toggle_window_floating(Some(window)); | 1284 | + let (tile, _) = col |
| 1283 | - return; | 1285 | + .tiles() |
| 1286 | + .find(|(tile, _)| tile.window().id() == window) | ||
| 1287 | + .unwrap(); | ||
| 1288 | + if tile.restore_to_floating { | ||
| 1289 | + // Unfullscreen and float in one call so it has a chance to notice and request a | ||
| 1290 | + // (0, 0) size, rather than the scrolling column size. | ||
| 1291 | + self.toggle_window_floating(Some(window)); | ||
| 1292 | + return; | ||
| 1293 | + } | ||
| 1284 | } | 1294 | } |
| 1285 | } | 1295 | } |
| 1286 | 1296 | ||
| 1287 | - let changed = self.scrolling.set_fullscreen(window, is_fullscreen); | 1297 | + let tile = self |
| 1298 | + .scrolling | ||
| 1299 | + .tiles() | ||
| 1300 | + .find(|tile| tile.window().id() == window) | ||
| 1301 | + .unwrap(); | ||
| 1302 | + let was_normal = tile.window().pending_sizing_mode().is_normal(); | ||
| 1288 | 1303 | ||
| 1289 | - // When going to fullscreen, remember if we should unfullscreen to floating. | 1304 | + self.scrolling.set_fullscreen(window, is_fullscreen); |
| 1290 | - if changed && is_fullscreen { | ||
| 1291 | - let tile = self | ||
| 1292 | - .scrolling | ||
| 1293 | - .tiles_mut() | ||
| 1294 | - .find(|tile| tile.window().id() == window) | ||
| 1295 | - .unwrap(); | ||
| 1296 | 1305 | ||
| 1297 | - tile.unfullscreen_to_floating = unfullscreen_to_floating; | 1306 | + // When going from normal to fullscreen, remember if we should unfullscreen to floating. |
| 1307 | + let tile = self | ||
| 1308 | + .scrolling | ||
| 1309 | + .tiles_mut() | ||
| 1310 | + .find(|tile| tile.window().id() == window) | ||
| 1311 | + .unwrap(); | ||
| 1312 | + if was_normal && !tile.window().pending_sizing_mode().is_normal() { | ||
| 1313 | + tile.restore_to_floating = restore_to_floating; | ||
| 1298 | } | 1314 | } |
| 1299 | } | 1315 | } |
| 1300 | 1316 | ||
| @@ -1303,10 +1319,75 @@ impl<W: LayoutElement> Workspace<W> { | |||
| 1303 | .tiles() | 1319 | .tiles() |
| 1304 | .find(|tile| tile.window().id() == window) | 1320 | .find(|tile| tile.window().id() == window) |
| 1305 | .unwrap(); | 1321 | .unwrap(); |
| 1306 | - let current = tile.window().is_pending_fullscreen(); | 1322 | + let current = tile.window().pending_sizing_mode().is_fullscreen(); |
| 1307 | self.set_fullscreen(window, !current); | 1323 | self.set_fullscreen(window, !current); |
| 1308 | } | 1324 | } |
| 1309 | 1325 | ||
| 1326 | + pub fn set_maximized(&mut self, window: &W::Id, maximize: bool) { | ||
| 1327 | + let mut restore_to_floating = false; | ||
| 1328 | + if self.floating.has_window(window) { | ||
| 1329 | + if maximize { | ||
| 1330 | + restore_to_floating = true; | ||
| 1331 | + self.toggle_window_floating(Some(window)); | ||
| 1332 | + } else { | ||
| 1333 | + // Floating windows are never maximized, so this is an unmaximize request for an | ||
| 1334 | + // already unmaximized window. | ||
| 1335 | + return; | ||
| 1336 | + } | ||
| 1337 | + } else if !maximize { | ||
| 1338 | + // The window is in the scrolling layout and we're requesting to unmaximize. If it is | ||
| 1339 | + // indeed maximized (i.e. this isn't a duplicate unmaximize request), then we may | ||
| 1340 | + // need to unmaximize into floating. | ||
| 1341 | + let tile = self | ||
| 1342 | + .scrolling | ||
| 1343 | + .tiles() | ||
| 1344 | + .find(|tile| tile.window().id() == window) | ||
| 1345 | + .unwrap(); | ||
| 1346 | + // The tile cannot unmaximize into fullscreen (pending_sizing_mode() will be fullscreen | ||
| 1347 | + // in that case and not maximized), so this check works. | ||
| 1348 | + if tile.window().pending_sizing_mode().is_maximized() && tile.restore_to_floating { | ||
| 1349 | + // Unmaximize and float in one call so it has a chance to notice and request a | ||
| 1350 | + // (0, 0) size, rather than the scrolling column size. | ||
| 1351 | + self.toggle_window_floating(Some(window)); | ||
| 1352 | + return; | ||
| 1353 | + } | ||
| 1354 | + } | ||
| 1355 | + | ||
| 1356 | + let tile = self | ||
| 1357 | + .scrolling | ||
| 1358 | + .tiles() | ||
| 1359 | + .find(|tile| tile.window().id() == window) | ||
| 1360 | + .unwrap(); | ||
| 1361 | + let was_normal = tile.window().pending_sizing_mode().is_normal(); | ||
| 1362 | + | ||
| 1363 | + self.scrolling.set_maximized(window, maximize); | ||
| 1364 | + | ||
| 1365 | + // When going from normal to maximized, remember if we should unmaximize to floating. | ||
| 1366 | + let tile = self | ||
| 1367 | + .scrolling | ||
| 1368 | + .tiles_mut() | ||
| 1369 | + .find(|tile| tile.window().id() == window) | ||
| 1370 | + .unwrap(); | ||
| 1371 | + if was_normal && !tile.window().pending_sizing_mode().is_normal() { | ||
| 1372 | + tile.restore_to_floating = restore_to_floating; | ||
| 1373 | + } | ||
| 1374 | + } | ||
| 1375 | + | ||
| 1376 | + pub fn toggle_maximized(&mut self, window: &W::Id) { | ||
| 1377 | + let mut current = false; | ||
| 1378 | + | ||
| 1379 | + // We have to check the column property in case the window is in the scrolling layout and | ||
| 1380 | + // both maximized and fullscreen. In this case, only the column knows whether it's | ||
| 1381 | + // maximized. | ||
| 1382 | + // | ||
| 1383 | + // In the floating layout, windows cannot be maximized. | ||
| 1384 | + if let Some(col) = self.scrolling.columns().find(|col| col.contains(window)) { | ||
| 1385 | + current = col.is_pending_maximized(); | ||
| 1386 | + } | ||
| 1387 | + | ||
| 1388 | + self.set_maximized(window, !current); | ||
| 1389 | + } | ||
| 1390 | + | ||
| 1310 | pub fn toggle_window_floating(&mut self, id: Option<&W::Id>) { | 1391 | pub fn toggle_window_floating(&mut self, id: Option<&W::Id>) { |
| 1311 | let active_id = self.active_window().map(|win| win.id().clone()); | 1392 | let active_id = self.active_window().map(|win| win.id().clone()); |
| 1312 | let target_is_active = id.map_or(true, |id| Some(id) == active_id.as_ref()); | 1393 | let target_is_active = id.map_or(true, |id| Some(id) == active_id.as_ref()); |
src/niri.rsmodified+7 -6
| @@ -2339,7 +2339,7 @@ impl Niri { | |||
| 2339 | let compositor_state = CompositorState::new_v6::<State>(&display_handle); | 2339 | let compositor_state = CompositorState::new_v6::<State>(&display_handle); |
| 2340 | let xdg_shell_state = XdgShellState::new_with_capabilities::<State>( | 2340 | let xdg_shell_state = XdgShellState::new_with_capabilities::<State>( |
| 2341 | &display_handle, | 2341 | &display_handle, |
| 2342 | - [WmCapabilities::Fullscreen], | 2342 | + [WmCapabilities::Fullscreen, WmCapabilities::Maximize], |
| 2343 | ); | 2343 | ); |
| 2344 | let xdg_decoration_state = | 2344 | let xdg_decoration_state = |
| 2345 | XdgDecorationState::new_with_filter::<State, _>(&display_handle, |client| { | 2345 | XdgDecorationState::new_with_filter::<State, _>(&display_handle, |client| { |
| @@ -5545,11 +5545,12 @@ impl Niri { | |||
| 5545 | let _span = tracy_client::span!("Niri::screenshot_window"); | 5545 | let _span = tracy_client::span!("Niri::screenshot_window"); |
| 5546 | 5546 | ||
| 5547 | let scale = Scale::from(output.current_scale().fractional_scale()); | 5547 | let scale = Scale::from(output.current_scale().fractional_scale()); |
| 5548 | - let alpha = if mapped.is_fullscreen() || mapped.is_ignoring_opacity_window_rule() { | 5548 | + let alpha = |
| 5549 | - 1. | 5549 | + if mapped.sizing_mode().is_fullscreen() || mapped.is_ignoring_opacity_window_rule() { |
| 5550 | - } else { | 5550 | + 1. |
| 5551 | - mapped.rules().opacity.unwrap_or(1.).clamp(0., 1.) | 5551 | + } else { |
| 5552 | - }; | 5552 | + mapped.rules().opacity.unwrap_or(1.).clamp(0., 1.) |
| 5553 | + }; | ||
| 5553 | // FIXME: pointer. | 5554 | // FIXME: pointer. |
| 5554 | let elements = mapped.render( | 5555 | let elements = mapped.render( |
| 5555 | renderer, | 5556 | renderer, |
src/protocols/foreign_toplevel.rsmodified+6 -2
| @@ -37,6 +37,8 @@ pub trait ForeignToplevelHandler { | |||
| 37 | fn close(&mut self, wl_surface: WlSurface); | 37 | fn close(&mut self, wl_surface: WlSurface); |
| 38 | fn set_fullscreen(&mut self, wl_surface: WlSurface, wl_output: Option<WlOutput>); | 38 | fn set_fullscreen(&mut self, wl_surface: WlSurface, wl_output: Option<WlOutput>); |
| 39 | fn unset_fullscreen(&mut self, wl_surface: WlSurface); | 39 | fn unset_fullscreen(&mut self, wl_surface: WlSurface); |
| 40 | + fn set_maximized(&mut self, wl_surface: WlSurface); | ||
| 41 | + fn unset_maximized(&mut self, wl_surface: WlSurface); | ||
| 40 | } | 42 | } |
| 41 | 43 | ||
| 42 | struct ToplevelData { | 44 | struct ToplevelData { |
| @@ -388,8 +390,10 @@ where | |||
| 388 | let surface = surface.clone(); | 390 | let surface = surface.clone(); |
| 389 | 391 | ||
| 390 | match request { | 392 | match request { |
| 391 | - zwlr_foreign_toplevel_handle_v1::Request::SetMaximized => (), | 393 | + zwlr_foreign_toplevel_handle_v1::Request::SetMaximized => state.set_maximized(surface), |
| 392 | - zwlr_foreign_toplevel_handle_v1::Request::UnsetMaximized => (), | 394 | + zwlr_foreign_toplevel_handle_v1::Request::UnsetMaximized => { |
| 395 | + state.unset_maximized(surface) | ||
| 396 | + } | ||
| 393 | zwlr_foreign_toplevel_handle_v1::Request::SetMinimized => (), | 397 | zwlr_foreign_toplevel_handle_v1::Request::SetMinimized => (), |
| 394 | zwlr_foreign_toplevel_handle_v1::Request::UnsetMinimized => (), | 398 | zwlr_foreign_toplevel_handle_v1::Request::UnsetMinimized => (), |
| 395 | zwlr_foreign_toplevel_handle_v1::Request::Activate { .. } => { | 399 | zwlr_foreign_toplevel_handle_v1::Request::Activate { .. } => { |
src/tests/client.rsmodified+8 -0
| @@ -357,6 +357,14 @@ impl Window { | |||
| 357 | self.xdg_toplevel.unset_fullscreen(); | 357 | self.xdg_toplevel.unset_fullscreen(); |
| 358 | } | 358 | } |
| 359 | 359 | ||
| 360 | + pub fn set_maximized(&self) { | ||
| 361 | + self.xdg_toplevel.set_maximized(); | ||
| 362 | + } | ||
| 363 | + | ||
| 364 | + pub fn unset_maximized(&self) { | ||
| 365 | + self.xdg_toplevel.unset_maximized(); | ||
| 366 | + } | ||
| 367 | + | ||
| 360 | pub fn set_parent(&self, parent: Option<&XdgToplevel>) { | 368 | pub fn set_parent(&self, parent: Option<&XdgToplevel>) { |
| 361 | self.xdg_toplevel.set_parent(parent); | 369 | self.xdg_toplevel.set_parent(parent); |
| 362 | } | 370 | } |
src/tests/floating.rsmodified+279 -0
| @@ -458,6 +458,55 @@ fn interactive_move_unfullscreen_to_floating_restores_size() { | |||
| 458 | ); | 458 | ); |
| 459 | } | 459 | } |
| 460 | 460 | ||
| 461 | +#[test] | ||
| 462 | +fn interactive_move_unmaximize_to_floating_restores_size() { | ||
| 463 | + let (mut f, id, surface) = set_up(); | ||
| 464 | + | ||
| 465 | + f.niri().layout.toggle_window_floating(None); | ||
| 466 | + f.double_roundtrip(id); | ||
| 467 | + | ||
| 468 | + // Change size while we're floating and commit. | ||
| 469 | + let window = f.client(id).window(&surface); | ||
| 470 | + window.set_size(200, 200); | ||
| 471 | + window.ack_last_and_commit(); | ||
| 472 | + f.double_roundtrip(id); | ||
| 473 | + | ||
| 474 | + let _ = f.client(id).window(&surface).recent_configures(); | ||
| 475 | + | ||
| 476 | + let niri = f.niri(); | ||
| 477 | + let mapped = niri.layout.windows().next().unwrap().1; | ||
| 478 | + let window = mapped.window.clone(); | ||
| 479 | + niri.layout.set_maximized(&window, true); | ||
| 480 | + f.double_roundtrip(id); | ||
| 481 | + | ||
| 482 | + // This should request a maximized size. | ||
| 483 | + assert_snapshot!( | ||
| 484 | + f.client(id).window(&surface).format_recent_configures(), | ||
| 485 | + @"size: 1920 × 1080, bounds: 1888 × 1048, states: [Activated, Maximized]" | ||
| 486 | + ); | ||
| 487 | + | ||
| 488 | + // Start an interactive move which causes an unmaximize into floating. | ||
| 489 | + let output = f.niri_output(1); | ||
| 490 | + let niri = f.niri(); | ||
| 491 | + let mapped = niri.layout.windows().next().unwrap().1; | ||
| 492 | + let window = mapped.window.clone(); | ||
| 493 | + niri.layout | ||
| 494 | + .interactive_move_begin(window.clone(), &output, Point::default()); | ||
| 495 | + niri.layout.interactive_move_update( | ||
| 496 | + &window, | ||
| 497 | + Point::from((1000., 0.)), | ||
| 498 | + output, | ||
| 499 | + Point::default(), | ||
| 500 | + ); | ||
| 501 | + f.double_roundtrip(id); | ||
| 502 | + | ||
| 503 | + // This should request the stored floating size (200 × 200). | ||
| 504 | + assert_snapshot!( | ||
| 505 | + f.client(id).window(&surface).format_recent_configures(), | ||
| 506 | + @"size: 200 × 200, bounds: 1920 × 1080, states: [Activated]" | ||
| 507 | + ); | ||
| 508 | +} | ||
| 509 | + | ||
| 461 | #[test] | 510 | #[test] |
| 462 | fn resize_during_interactive_move_propagates_to_floating() { | 511 | fn resize_during_interactive_move_propagates_to_floating() { |
| 463 | let (mut f, id, surface) = set_up(); | 512 | let (mut f, id, surface) = set_up(); |
| @@ -791,6 +840,66 @@ fn floating_doesnt_store_fullscreen_size() { | |||
| 791 | ); | 840 | ); |
| 792 | } | 841 | } |
| 793 | 842 | ||
| 843 | +#[test] | ||
| 844 | +fn floating_doesnt_store_maximized_size() { | ||
| 845 | + let mut f = Fixture::new(); | ||
| 846 | + f.add_output(1, (1920, 1080)); | ||
| 847 | + f.add_output(2, (1280, 720)); | ||
| 848 | + | ||
| 849 | + // Open a window maximized. | ||
| 850 | + let id = f.add_client(); | ||
| 851 | + let window = f.client(id).create_window(); | ||
| 852 | + let surface = window.surface.clone(); | ||
| 853 | + window.set_maximized(); | ||
| 854 | + window.commit(); | ||
| 855 | + f.roundtrip(id); | ||
| 856 | + | ||
| 857 | + let window = f.client(id).window(&surface); | ||
| 858 | + window.attach_new_buffer(); | ||
| 859 | + window.set_size(1920, 1080); | ||
| 860 | + window.ack_last_and_commit(); | ||
| 861 | + f.double_roundtrip(id); | ||
| 862 | + | ||
| 863 | + let _ = f.client(id).window(&surface).recent_configures(); | ||
| 864 | + | ||
| 865 | + // Make it floating. | ||
| 866 | + f.niri().layout.toggle_window_floating(None); | ||
| 867 | + f.double_roundtrip(id); | ||
| 868 | + | ||
| 869 | + // This should request 0 × 0 to unmaximize. | ||
| 870 | + assert_snapshot!( | ||
| 871 | + f.client(id).window(&surface).format_recent_configures(), | ||
| 872 | + @"size: 0 × 0, bounds: 1920 × 1080, states: [Activated]" | ||
| 873 | + ); | ||
| 874 | + | ||
| 875 | + // Without committing, make it tiling again. We never committed while floating, so there's no | ||
| 876 | + // floating size to remember. | ||
| 877 | + f.niri().layout.toggle_window_floating(None); | ||
| 878 | + f.double_roundtrip(id); | ||
| 879 | + | ||
| 880 | + // This should request the tiled size. | ||
| 881 | + assert_snapshot!( | ||
| 882 | + f.client(id).window(&surface).format_recent_configures(), | ||
| 883 | + @"size: 1920 × 1048, bounds: 1888 × 1048, states: [Activated]" | ||
| 884 | + ); | ||
| 885 | + | ||
| 886 | + // Commit in response. | ||
| 887 | + let window = f.client(id).window(&surface); | ||
| 888 | + window.set_size(100, 100); | ||
| 889 | + window.ack_last_and_commit(); | ||
| 890 | + f.roundtrip(id); | ||
| 891 | + | ||
| 892 | + // Make the window floating again. | ||
| 893 | + f.niri().layout.toggle_window_floating(None); | ||
| 894 | + f.double_roundtrip(id); | ||
| 895 | + | ||
| 896 | + // This shouldn't request any size change, particularly not the maximized size. | ||
| 897 | + assert_snapshot!( | ||
| 898 | + f.client(id).window(&surface).format_recent_configures(), | ||
| 899 | + @"size: 100 × 100, bounds: 1920 × 1080, states: [Activated]" | ||
| 900 | + ); | ||
| 901 | +} | ||
| 902 | + | ||
| 794 | #[test] | 903 | #[test] |
| 795 | fn floating_respects_non_fixed_min_max_rule() { | 904 | fn floating_respects_non_fixed_min_max_rule() { |
| 796 | let config = r##" | 905 | let config = r##" |
| @@ -888,6 +997,33 @@ fn unfullscreen_to_floating_doesnt_send_extra_configure() { | |||
| 888 | ); | 997 | ); |
| 889 | } | 998 | } |
| 890 | 999 | ||
| 1000 | +#[test] | ||
| 1001 | +fn unmaximize_to_floating_doesnt_send_extra_configure() { | ||
| 1002 | + let (mut f, id, surface) = set_up(); | ||
| 1003 | + | ||
| 1004 | + // Make it floating. | ||
| 1005 | + f.niri().layout.toggle_window_floating(None); | ||
| 1006 | + f.roundtrip(id); | ||
| 1007 | + | ||
| 1008 | + // Maximize. | ||
| 1009 | + let window = f.client(id).window(&surface); | ||
| 1010 | + window.set_maximized(); | ||
| 1011 | + f.double_roundtrip(id); | ||
| 1012 | + | ||
| 1013 | + let _ = f.client(id).window(&surface).recent_configures(); | ||
| 1014 | + | ||
| 1015 | + // Unmaximzie via the window request which requires a configure response. | ||
| 1016 | + let window = f.client(id).window(&surface); | ||
| 1017 | + window.unset_maximized(); | ||
| 1018 | + f.double_roundtrip(id); | ||
| 1019 | + | ||
| 1020 | + // This should configure only once and not twice. | ||
| 1021 | + assert_snapshot!( | ||
| 1022 | + f.client(id).window(&surface).format_recent_configures(), | ||
| 1023 | + @"size: 936 × 1048, bounds: 1920 × 1080, states: [Activated]" | ||
| 1024 | + ); | ||
| 1025 | +} | ||
| 1026 | + | ||
| 891 | #[test] | 1027 | #[test] |
| 892 | fn unfullscreen_to_same_size_floating() { | 1028 | fn unfullscreen_to_same_size_floating() { |
| 893 | let (mut f, id, surface) = set_up(); | 1029 | let (mut f, id, surface) = set_up(); |
| @@ -926,6 +1062,44 @@ fn unfullscreen_to_same_size_floating() { | |||
| 926 | ); | 1062 | ); |
| 927 | } | 1063 | } |
| 928 | 1064 | ||
| 1065 | +#[test] | ||
| 1066 | +fn unmaximize_to_same_size_floating() { | ||
| 1067 | + let (mut f, id, surface) = set_up(); | ||
| 1068 | + | ||
| 1069 | + // Make it floating. | ||
| 1070 | + f.niri().layout.toggle_window_floating(None); | ||
| 1071 | + f.double_roundtrip(id); | ||
| 1072 | + | ||
| 1073 | + // Change size to the same as maximized, make niri remember it. | ||
| 1074 | + let window = f.client(id).window(&surface); | ||
| 1075 | + window.set_size(1920, 1080); | ||
| 1076 | + window.ack_last_and_commit(); | ||
| 1077 | + f.double_roundtrip(id); | ||
| 1078 | + | ||
| 1079 | + let _ = f.client(id).window(&surface).recent_configures(); | ||
| 1080 | + | ||
| 1081 | + // Maximize. | ||
| 1082 | + let window = f.client(id).window(&surface); | ||
| 1083 | + window.set_maximized(); | ||
| 1084 | + f.double_roundtrip(id); | ||
| 1085 | + | ||
| 1086 | + // The maximize configure. | ||
| 1087 | + assert_snapshot!( | ||
| 1088 | + f.client(id).window(&surface).format_recent_configures(), | ||
| 1089 | + @"size: 1920 × 1080, bounds: 1888 × 1048, states: [Activated, Maximized]" | ||
| 1090 | + ); | ||
| 1091 | + | ||
| 1092 | + // Unmaximize into floating. | ||
| 1093 | + f.niri().layout.toggle_window_floating(None); | ||
| 1094 | + f.double_roundtrip(id); | ||
| 1095 | + | ||
| 1096 | + // We should see a configure with the same size and no maximized state. | ||
| 1097 | + assert_snapshot!( | ||
| 1098 | + f.client(id).window(&surface).format_recent_configures(), | ||
| 1099 | + @"size: 1920 × 1080, bounds: 1920 × 1080, states: [Activated]" | ||
| 1100 | + ); | ||
| 1101 | +} | ||
| 1102 | + | ||
| 929 | #[test] | 1103 | #[test] |
| 930 | fn unfullscreen_to_same_size_windowed_fullscreen_floating() { | 1104 | fn unfullscreen_to_same_size_windowed_fullscreen_floating() { |
| 931 | let (mut f, id, surface) = set_up(); | 1105 | let (mut f, id, surface) = set_up(); |
| @@ -967,6 +1141,67 @@ fn unfullscreen_to_same_size_windowed_fullscreen_floating() { | |||
| 967 | ); | 1141 | ); |
| 968 | } | 1142 | } |
| 969 | 1143 | ||
| 1144 | +#[test] | ||
| 1145 | +fn unmaximize_to_same_size_windowed_fullscreen_floating() { | ||
| 1146 | + let (mut f, id, surface) = set_up(); | ||
| 1147 | + | ||
| 1148 | + let mapped = f.niri().layout.windows().next().unwrap().1; | ||
| 1149 | + let window_id = mapped.window.clone(); | ||
| 1150 | + | ||
| 1151 | + // Make it floating. | ||
| 1152 | + f.niri().layout.toggle_window_floating(None); | ||
| 1153 | + f.double_roundtrip(id); | ||
| 1154 | + | ||
| 1155 | + // Change size to the same as maximized, make niri remember it. | ||
| 1156 | + let window = f.client(id).window(&surface); | ||
| 1157 | + window.set_size(1920, 1080); | ||
| 1158 | + window.ack_last_and_commit(); | ||
| 1159 | + f.double_roundtrip(id); | ||
| 1160 | + | ||
| 1161 | + let _ = f.client(id).window(&surface).recent_configures(); | ||
| 1162 | + | ||
| 1163 | + // Maximize. | ||
| 1164 | + let window = f.client(id).window(&surface); | ||
| 1165 | + window.set_maximized(); | ||
| 1166 | + f.double_roundtrip(id); | ||
| 1167 | + | ||
| 1168 | + // The maximize configure. | ||
| 1169 | + assert_snapshot!( | ||
| 1170 | + f.client(id).window(&surface).format_recent_configures(), | ||
| 1171 | + @"size: 1920 × 1080, bounds: 1888 × 1048, states: [Activated, Maximized]" | ||
| 1172 | + ); | ||
| 1173 | + | ||
| 1174 | + // Enable windowed-fullscreen. | ||
| 1175 | + f.niri().layout.toggle_windowed_fullscreen(&window_id); | ||
| 1176 | + f.double_roundtrip(id); | ||
| 1177 | + | ||
| 1178 | + // The windowed-fullscreen configure. | ||
| 1179 | + assert_snapshot!( | ||
| 1180 | + f.client(id).window(&surface).format_recent_configures(), | ||
| 1181 | + @"size: 1920 × 1080, bounds: 1888 × 1048, states: [Activated, Fullscreen]" | ||
| 1182 | + ); | ||
| 1183 | + | ||
| 1184 | + // Go back to windowed-fullscreen floating. | ||
| 1185 | + f.niri().layout.toggle_window_floating(None); | ||
| 1186 | + f.double_roundtrip(id); | ||
| 1187 | + | ||
| 1188 | + // Should send configure because the bounds have changed. | ||
| 1189 | + assert_snapshot!( | ||
| 1190 | + f.client(id).window(&surface).format_recent_configures(), | ||
| 1191 | + @"size: 1920 × 1080, bounds: 1920 × 1080, states: [Activated, Fullscreen]" | ||
| 1192 | + ); | ||
| 1193 | + | ||
| 1194 | + // Disable windowed-fullscreen. | ||
| 1195 | + f.niri().layout.toggle_windowed_fullscreen(&window_id); | ||
| 1196 | + f.double_roundtrip(id); | ||
| 1197 | + | ||
| 1198 | + // Should send configure dropping the Fullscreen state. | ||
| 1199 | + assert_snapshot!( | ||
| 1200 | + f.client(id).window(&surface).format_recent_configures(), | ||
| 1201 | + @"size: 1920 × 1080, bounds: 1920 × 1080, states: [Activated]" | ||
| 1202 | + ); | ||
| 1203 | +} | ||
| 1204 | + | ||
| 970 | #[test] | 1205 | #[test] |
| 971 | fn unfullscreen_to_same_size_same_bounds_floating() { | 1206 | fn unfullscreen_to_same_size_same_bounds_floating() { |
| 972 | let config = r##" | 1207 | let config = r##" |
| @@ -1011,6 +1246,50 @@ layout { | |||
| 1011 | ); | 1246 | ); |
| 1012 | } | 1247 | } |
| 1013 | 1248 | ||
| 1249 | +#[test] | ||
| 1250 | +fn unmaximize_to_same_size_same_bounds_floating() { | ||
| 1251 | + let config = r##" | ||
| 1252 | +layout { | ||
| 1253 | + gaps 0 | ||
| 1254 | +} | ||
| 1255 | +"##; | ||
| 1256 | + let config = Config::parse_mem(config).unwrap(); | ||
| 1257 | + let (mut f, id, surface) = set_up_with_config(config); | ||
| 1258 | + | ||
| 1259 | + // Make it floating. | ||
| 1260 | + f.niri().layout.toggle_window_floating(None); | ||
| 1261 | + f.double_roundtrip(id); | ||
| 1262 | + | ||
| 1263 | + // Change size to the same as fullscreen, make niri remember it. | ||
| 1264 | + let window = f.client(id).window(&surface); | ||
| 1265 | + window.set_size(1920, 1080); | ||
| 1266 | + window.ack_last_and_commit(); | ||
| 1267 | + f.double_roundtrip(id); | ||
| 1268 | + | ||
| 1269 | + let _ = f.client(id).window(&surface).recent_configures(); | ||
| 1270 | + | ||
| 1271 | + // Maximize. | ||
| 1272 | + let window = f.client(id).window(&surface); | ||
| 1273 | + window.set_maximized(); | ||
| 1274 | + f.double_roundtrip(id); | ||
| 1275 | + | ||
| 1276 | + // The maximize configure. | ||
| 1277 | + assert_snapshot!( | ||
| 1278 | + f.client(id).window(&surface).format_recent_configures(), | ||
| 1279 | + @"size: 1920 × 1080, bounds: 1920 × 1080, states: [Activated, Maximized]" | ||
| 1280 | + ); | ||
| 1281 | + | ||
| 1282 | + // Unmaximize into floating. | ||
| 1283 | + f.niri().layout.toggle_window_floating(None); | ||
| 1284 | + f.double_roundtrip(id); | ||
| 1285 | + | ||
| 1286 | + // We should see a configure with the same size and no Maximized state. | ||
| 1287 | + assert_snapshot!( | ||
| 1288 | + f.client(id).window(&surface).format_recent_configures(), | ||
| 1289 | + @"size: 1920 × 1080, bounds: 1920 × 1080, states: [Activated]" | ||
| 1290 | + ); | ||
| 1291 | +} | ||
| 1292 | + | ||
| 1014 | #[test] | 1293 | #[test] |
| 1015 | fn repeated_size_request() { | 1294 | fn repeated_size_request() { |
| 1016 | let (mut f, id, surface) = set_up(); | 1295 | let (mut f, id, surface) = set_up(); |
src/tests/fullscreen.rsmodified+41 -1
| @@ -127,7 +127,7 @@ fn windowed_fullscreen_chain() { | |||
| 127 | let mapped = f.niri().layout.windows().next().unwrap().1; | 127 | let mapped = f.niri().layout.windows().next().unwrap().1; |
| 128 | format!( | 128 | format!( |
| 129 | "fs {}, wfs {}", | 129 | "fs {}, wfs {}", |
| 130 | - mapped.is_fullscreen(), | 130 | + mapped.sizing_mode().is_fullscreen(), |
| 131 | mapped.is_windowed_fullscreen() | 131 | mapped.is_windowed_fullscreen() |
| 132 | ) | 132 | ) |
| 133 | }; | 133 | }; |
| @@ -255,3 +255,43 @@ fn interactive_move_unfullscreen_to_scrolling_restores_size() { | |||
| 255 | @"size: 936 × 1048, bounds: 1920 × 1080, states: [Activated]" | 255 | @"size: 936 × 1048, bounds: 1920 × 1080, states: [Activated]" |
| 256 | ); | 256 | ); |
| 257 | } | 257 | } |
| 258 | + | ||
| 259 | +#[test] | ||
| 260 | +fn interactive_move_unmaximize_to_scrolling_restores_size() { | ||
| 261 | + let (mut f, id, surface) = set_up(); | ||
| 262 | + | ||
| 263 | + let _ = f.client(id).window(&surface).recent_configures(); | ||
| 264 | + | ||
| 265 | + let niri = f.niri(); | ||
| 266 | + let mapped = niri.layout.windows().next().unwrap().1; | ||
| 267 | + let window = mapped.window.clone(); | ||
| 268 | + niri.layout.set_maximized(&window, true); | ||
| 269 | + f.double_roundtrip(id); | ||
| 270 | + | ||
| 271 | + // This should request a maximized size. | ||
| 272 | + assert_snapshot!( | ||
| 273 | + f.client(id).window(&surface).format_recent_configures(), | ||
| 274 | + @"size: 1920 × 1080, bounds: 1888 × 1048, states: [Activated, Maximized]" | ||
| 275 | + ); | ||
| 276 | + | ||
| 277 | + // Start an interactive move which causes an unmaximize. | ||
| 278 | + let output = f.niri_output(1); | ||
| 279 | + let niri = f.niri(); | ||
| 280 | + let mapped = niri.layout.windows().next().unwrap().1; | ||
| 281 | + let window = mapped.window.clone(); | ||
| 282 | + niri.layout | ||
| 283 | + .interactive_move_begin(window.clone(), &output, Point::default()); | ||
| 284 | + niri.layout.interactive_move_update( | ||
| 285 | + &window, | ||
| 286 | + Point::from((1000., 0.)), | ||
| 287 | + output, | ||
| 288 | + Point::default(), | ||
| 289 | + ); | ||
| 290 | + f.double_roundtrip(id); | ||
| 291 | + | ||
| 292 | + // This should request the tiled size. | ||
| 293 | + assert_snapshot!( | ||
| 294 | + f.client(id).window(&surface).format_recent_configures(), | ||
| 295 | + @"size: 936 × 1048, bounds: 1920 × 1080, states: [Activated]" | ||
| 296 | + ); | ||
| 297 | +} | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "config:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN-wmA.snapadded+18 -0
| @@ -0,0 +1,18 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 13 | + | ||
| 14 | +unfullscreen configure: | ||
| 15 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 16 | + | ||
| 17 | +unmaximize configure: | ||
| 18 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN-wmAU.snapadded+15 -0
| @@ -0,0 +1,15 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 13 | + | ||
| 14 | +unfullscreen configure: | ||
| 15 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN-wmB.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN-wmBU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU-wmA.snapadded+15 -0
| @@ -0,0 +1,15 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 13 | + | ||
| 14 | +unmaximize configure: | ||
| 15 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU-wmAU.snapadded+12 -0
| @@ -0,0 +1,12 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 12 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU-wmB.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU-wmBU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN-wmA.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN-wmAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN-wmB.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN-wmBU.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU-wmA.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU-wmAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU-wmB.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU-wmBU.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wmA.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wmAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wmB.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wmBU.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "config:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN-wmA.snapadded+18 -0
| @@ -0,0 +1,18 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 13 | + | ||
| 14 | +unfullscreen configure: | ||
| 15 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 16 | + | ||
| 17 | +unmaximize configure: | ||
| 18 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN-wmAU.snapadded+15 -0
| @@ -0,0 +1,15 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 13 | + | ||
| 14 | +unfullscreen configure: | ||
| 15 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN-wmB.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN-wmBU.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU-wmA.snapadded+15 -0
| @@ -0,0 +1,15 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 13 | + | ||
| 14 | +unmaximize configure: | ||
| 15 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU-wmAU.snapadded+12 -0
| @@ -0,0 +1,12 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 12 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU-wmB.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU-wmBU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN-wmA.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN-wmAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN-wmB.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 11 | + | ||
| 12 | +unmaximize configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN-wmBU.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 11 | + | ||
| 12 | +unmaximize configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 11 | + | ||
| 12 | +unmaximize configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU-wmA.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU-wmAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU-wmB.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 11 | + | ||
| 12 | +unmaximize configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU-wmBU.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 11 | + | ||
| 12 | +unmaximize configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 11 | + | ||
| 12 | +unmaximize configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wmA.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wmAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wmB.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 11 | + | ||
| 12 | +unmaximize configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wmBU.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 11 | + | ||
| 12 | +unmaximize configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "config:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 11 | + | ||
| 12 | +unmaximize configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN-wmA.snapadded+18 -0
| @@ -0,0 +1,18 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 13 | + | ||
| 14 | +unfullscreen configure: | ||
| 15 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 16 | + | ||
| 17 | +unmaximize configure: | ||
| 18 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN-wmAU.snapadded+15 -0
| @@ -0,0 +1,15 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 13 | + | ||
| 14 | +unfullscreen configure: | ||
| 15 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN-wmB.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN-wmBU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU-wmA.snapadded+15 -0
| @@ -0,0 +1,15 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 13 | + | ||
| 14 | +unmaximize configure: | ||
| 15 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU-wmAU.snapadded+12 -0
| @@ -0,0 +1,12 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 12 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU-wmB.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU-wmBU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN-wmA.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN-wmAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN-wmB.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 11 | + | ||
| 12 | +unmaximize configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN-wmBU.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU-wmA.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU-wmAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU-wmB.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 11 | + | ||
| 12 | +unmaximize configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU-wmBU.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wmA.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wmAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wmB.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 11 | + | ||
| 12 | +unmaximize configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wmBU.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "config:\nwindow-rule {\n open-fullscreen false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN-wmA.snapadded+18 -0
| @@ -0,0 +1,18 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 13 | + | ||
| 14 | +unfullscreen configure: | ||
| 15 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 16 | + | ||
| 17 | +unmaximize configure: | ||
| 18 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN-wmAU.snapadded+15 -0
| @@ -0,0 +1,15 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 13 | + | ||
| 14 | +unfullscreen configure: | ||
| 15 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN-wmB.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN-wmBU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU-wmA.snapadded+15 -0
| @@ -0,0 +1,15 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 13 | + | ||
| 14 | +unmaximize configure: | ||
| 15 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU-wmAU.snapadded+12 -0
| @@ -0,0 +1,12 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 12 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU-wmB.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU-wmBU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN-wmA.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN-wmAU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN-wmB.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN-wmBU.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU-wmA.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU-wmAU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU-wmB.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU-wmBU.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wmA.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wmAU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wmB.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wmBU.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "config:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN-wmA.snapadded+18 -0
| @@ -0,0 +1,18 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 13 | + | ||
| 14 | +unfullscreen configure: | ||
| 15 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 16 | + | ||
| 17 | +unmaximize configure: | ||
| 18 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN-wmAU.snapadded+15 -0
| @@ -0,0 +1,15 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 13 | + | ||
| 14 | +unfullscreen configure: | ||
| 15 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN-wmB.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN-wmBU.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU-wmA.snapadded+15 -0
| @@ -0,0 +1,15 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 13 | + | ||
| 14 | +unmaximize configure: | ||
| 15 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU-wmAU.snapadded+12 -0
| @@ -0,0 +1,12 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 12 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU-wmB.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU-wmBU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN-wmA.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN-wmAU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN-wmB.snapadded+16 -0
| @@ -0,0 +1,16 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 14 | + | ||
| 15 | +unmaximize configure: | ||
| 16 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN-wmBU.snapadded+16 -0
| @@ -0,0 +1,16 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 14 | + | ||
| 15 | +unmaximize configure: | ||
| 16 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN.snapadded+16 -0
| @@ -0,0 +1,16 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 14 | + | ||
| 15 | +unmaximize configure: | ||
| 16 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU-wmA.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU-wmAU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU-wmB.snapadded+16 -0
| @@ -0,0 +1,16 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 14 | + | ||
| 15 | +unmaximize configure: | ||
| 16 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU-wmBU.snapadded+16 -0
| @@ -0,0 +1,16 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 14 | + | ||
| 15 | +unmaximize configure: | ||
| 16 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU.snapadded+16 -0
| @@ -0,0 +1,16 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 14 | + | ||
| 15 | +unmaximize configure: | ||
| 16 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wmA.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wmAU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wmB.snapadded+16 -0
| @@ -0,0 +1,16 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 14 | + | ||
| 15 | +unmaximize configure: | ||
| 16 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wmBU.snapadded+16 -0
| @@ -0,0 +1,16 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 14 | + | ||
| 15 | +unmaximize configure: | ||
| 16 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT.snapadded+16 -0
| @@ -0,0 +1,16 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "config:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 14 | + | ||
| 15 | +unmaximize configure: | ||
| 16 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN-wmA.snapadded+18 -0
| @@ -0,0 +1,18 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 13 | + | ||
| 14 | +unfullscreen configure: | ||
| 15 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 16 | + | ||
| 17 | +unmaximize configure: | ||
| 18 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN-wmAU.snapadded+15 -0
| @@ -0,0 +1,15 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 13 | + | ||
| 14 | +unfullscreen configure: | ||
| 15 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN-wmB.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN-wmBU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU-wmA.snapadded+15 -0
| @@ -0,0 +1,15 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 13 | + | ||
| 14 | +unmaximize configure: | ||
| 15 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU-wmAU.snapadded+12 -0
| @@ -0,0 +1,12 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 12 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU-wmB.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU-wmBU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN-wmA.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN-wmAU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN-wmB.snapadded+16 -0
| @@ -0,0 +1,16 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 14 | + | ||
| 15 | +unmaximize configure: | ||
| 16 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN-wmBU.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU-wmA.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU-wmAU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU-wmB.snapadded+16 -0
| @@ -0,0 +1,16 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 14 | + | ||
| 15 | +unmaximize configure: | ||
| 16 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU-wmBU.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wmA.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wmAU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wmB.snapadded+16 -0
| @@ -0,0 +1,16 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 14 | + | ||
| 15 | +unmaximize configure: | ||
| 16 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wmBU.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "config:\nwindow-rule {\n open-fullscreen true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN-wmA.snapadded+18 -0
| @@ -0,0 +1,18 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: A\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 13 | + | ||
| 14 | +unfullscreen configure: | ||
| 15 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 16 | + | ||
| 17 | +unmaximize configure: | ||
| 18 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN-wmAU.snapadded+15 -0
| @@ -0,0 +1,15 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 13 | + | ||
| 14 | +unfullscreen configure: | ||
| 15 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN-wmB.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: B\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN-wmBU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU-wmA.snapadded+15 -0
| @@ -0,0 +1,15 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: A\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 13 | + | ||
| 14 | +unmaximize configure: | ||
| 15 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU-wmAU.snapadded+12 -0
| @@ -0,0 +1,12 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 12 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU-wmB.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: B\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU-wmBU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN-wmA.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: A\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN-wmAU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN-wmB.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: B\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN-wmBU.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU-wmA.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: A\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU-wmAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU-wmB.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: B\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU-wmBU.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wmA.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: A\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wmAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wmB.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: B\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wmBU.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "config:\nwindow-rule {\n open-maximized-to-edges false\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN-wmA.snapadded+18 -0
| @@ -0,0 +1,18 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: A\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 13 | + | ||
| 14 | +unfullscreen configure: | ||
| 15 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 16 | + | ||
| 17 | +unmaximize configure: | ||
| 18 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN-wmAU.snapadded+15 -0
| @@ -0,0 +1,15 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 13 | + | ||
| 14 | +unfullscreen configure: | ||
| 15 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN-wmB.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: B\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN-wmBU.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU-wmA.snapadded+15 -0
| @@ -0,0 +1,15 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: A\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 13 | + | ||
| 14 | +unmaximize configure: | ||
| 15 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU-wmAU.snapadded+12 -0
| @@ -0,0 +1,12 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 12 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU-wmB.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: B\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU-wmBU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN-wmA.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: A\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN-wmAU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN-wmB.snapadded+16 -0
| @@ -0,0 +1,16 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: B\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 14 | + | ||
| 15 | +unmaximize configure: | ||
| 16 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN-wmBU.snapadded+16 -0
| @@ -0,0 +1,16 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 14 | + | ||
| 15 | +unmaximize configure: | ||
| 16 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN.snapadded+16 -0
| @@ -0,0 +1,16 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 14 | + | ||
| 15 | +unmaximize configure: | ||
| 16 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU-wmA.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: A\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU-wmAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU-wmB.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: B\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 11 | + | ||
| 12 | +unmaximize configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU-wmBU.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 11 | + | ||
| 12 | +unmaximize configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 11 | + | ||
| 12 | +unmaximize configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wmA.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: A\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wmAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wmB.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: B\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 11 | + | ||
| 12 | +unmaximize configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wmBU.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 11 | + | ||
| 12 | +unmaximize configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "config:\nwindow-rule {\n open-maximized-to-edges true\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 11 | + | ||
| 12 | +unmaximize configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN-wmA.snapadded+18 -0
| @@ -0,0 +1,18 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: A\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 13 | + | ||
| 14 | +unfullscreen configure: | ||
| 15 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 16 | + | ||
| 17 | +unmaximize configure: | ||
| 18 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN-wmAU.snapadded+15 -0
| @@ -0,0 +1,15 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: AU\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 13 | + | ||
| 14 | +unfullscreen configure: | ||
| 15 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN-wmB.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: B\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN-wmBU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nwant maximized: BU\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AN\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU-wmA.snapadded+15 -0
| @@ -0,0 +1,15 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: A\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 12 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 13 | + | ||
| 14 | +unmaximize configure: | ||
| 15 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU-wmAU.snapadded+12 -0
| @@ -0,0 +1,12 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: AU\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 12 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU-wmB.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: B\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU-wmBU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nwant maximized: BU\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: AU\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN-wmA.snapadded+17 -0
| @@ -0,0 +1,17 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: A\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 15 | + | ||
| 16 | +unmaximize configure: | ||
| 17 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN-wmAU.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: AU\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 12 | + | ||
| 13 | +unfullscreen configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN-wmB.snapadded+16 -0
| @@ -0,0 +1,16 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: B\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] | ||
| 14 | + | ||
| 15 | +unmaximize configure: | ||
| 16 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN-wmBU.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nwant maximized: BU\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BN\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] | ||
| 11 | + | ||
| 12 | +unfullscreen configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU-wmA.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: A\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU-wmAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: AU\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU-wmB.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: B\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 11 | + | ||
| 12 | +unmaximize configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU-wmBU.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nwant maximized: BU\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want fullscreen: BU\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wmA.snapadded+14 -0
| @@ -0,0 +1,14 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: A\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 11 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 12 | + | ||
| 13 | +unmaximize configure: | ||
| 14 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wmAU.snapadded+11 -0
| @@ -0,0 +1,11 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: AU\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 11 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wmB.snapadded+13 -0
| @@ -0,0 +1,13 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: B\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] | ||
| 11 | + | ||
| 12 | +unmaximize configure: | ||
| 13 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wmBU.snapadded+10 -0
| @@ -0,0 +1,10 @@ | |||
| 1 | +--- | ||
| 2 | +source: src/tests/window_opening.rs | ||
| 3 | +description: "want maximized: BU\nconfig:\nwindow-rule {\n}" | ||
| 4 | +expression: snapshot | ||
| 5 | +--- | ||
| 6 | +initial configure: | ||
| 7 | +size: 616 × 688, bounds: 1248 × 688, states: [] | ||
| 8 | + | ||
| 9 | +post-map configures: | ||
| 10 | +size: 616 × 688, bounds: 1248 × 688, states: [Activated] | ||
src/tests/window_opening.rsmodified+230 -3
| @@ -5,7 +5,7 @@ use niri_config::Config; | |||
| 5 | use rayon::iter::{IntoParallelIterator, ParallelIterator}; | 5 | use rayon::iter::{IntoParallelIterator, ParallelIterator}; |
| 6 | 6 | ||
| 7 | use super::*; | 7 | use super::*; |
| 8 | -use crate::layout::LayoutElement; | 8 | +use crate::layout::LayoutElement as _; |
| 9 | use crate::utils::with_toplevel_role; | 9 | use crate::utils::with_toplevel_role; |
| 10 | 10 | ||
| 11 | #[test] | 11 | #[test] |
| @@ -105,6 +105,28 @@ impl fmt::Display for WantFullscreen { | |||
| 105 | } | 105 | } |
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | +#[derive(Clone, Copy)] | ||
| 109 | +enum WantMaximized { | ||
| 110 | + No, | ||
| 111 | + UnsetBeforeInitial, | ||
| 112 | + BeforeInitial, | ||
| 113 | + UnsetAfterInitial, | ||
| 114 | + AfterInitial, | ||
| 115 | +} | ||
| 116 | + | ||
| 117 | +impl fmt::Display for WantMaximized { | ||
| 118 | + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ||
| 119 | + match self { | ||
| 120 | + WantMaximized::No => write!(f, "U")?, | ||
| 121 | + WantMaximized::UnsetBeforeInitial => write!(f, "BU")?, | ||
| 122 | + WantMaximized::UnsetAfterInitial => write!(f, "AU")?, | ||
| 123 | + WantMaximized::BeforeInitial => write!(f, "B")?, | ||
| 124 | + WantMaximized::AfterInitial => write!(f, "A")?, | ||
| 125 | + } | ||
| 126 | + Ok(()) | ||
| 127 | + } | ||
| 128 | +} | ||
| 129 | + | ||
| 108 | #[derive(Clone, Copy)] | 130 | #[derive(Clone, Copy)] |
| 109 | enum SetParent { | 131 | enum SetParent { |
| 110 | BeforeInitial(&'static str), | 132 | BeforeInitial(&'static str), |
| @@ -369,7 +391,7 @@ window-rule {{ | |||
| 369 | }) | 391 | }) |
| 370 | }) | 392 | }) |
| 371 | .unwrap(); | 393 | .unwrap(); |
| 372 | - let is_fullscreen = mapped.is_fullscreen(); | 394 | + let is_fullscreen = mapped.sizing_mode().is_fullscreen(); |
| 373 | let win = mapped.window.clone(); | 395 | let win = mapped.window.clone(); |
| 374 | let mon = mon.unwrap().output_name().clone(); | 396 | let mon = mon.unwrap().output_name().clone(); |
| 375 | let ws = ws.name().cloned().unwrap_or(String::from("unnamed")); | 397 | let ws = ws.name().cloned().unwrap_or(String::from("unnamed")); |
| @@ -629,7 +651,7 @@ layout { | |||
| 629 | // If the window ended up fullscreen, unfullscreen it and output the configure. | 651 | // If the window ended up fullscreen, unfullscreen it and output the configure. |
| 630 | let mut post_unfullscreen = String::new(); | 652 | let mut post_unfullscreen = String::new(); |
| 631 | let mapped = f.niri().layout.windows().next().unwrap().1; | 653 | let mapped = f.niri().layout.windows().next().unwrap().1; |
| 632 | - let is_fullscreen = mapped.is_fullscreen(); | 654 | + let is_fullscreen = mapped.sizing_mode().is_fullscreen(); |
| 633 | let win = mapped.window.clone(); | 655 | let win = mapped.window.clone(); |
| 634 | if is_fullscreen { | 656 | if is_fullscreen { |
| 635 | f.niri().layout.set_fullscreen(&win, false); | 657 | f.niri().layout.set_fullscreen(&win, false); |
| @@ -657,3 +679,208 @@ post-map configures: | |||
| 657 | let _guard = settings.bind_to_scope(); | 679 | let _guard = settings.bind_to_scope(); |
| 658 | assert_snapshot!(snapshot); | 680 | assert_snapshot!(snapshot); |
| 659 | } | 681 | } |
| 682 | + | ||
| 683 | +#[test] | ||
| 684 | +fn fullscreen_maximize() { | ||
| 685 | + let open_fullscreen = [None, Some("false"), Some("true")]; | ||
| 686 | + let want_fullscreen = [ | ||
| 687 | + WantFullscreen::No, | ||
| 688 | + WantFullscreen::UnsetBeforeInitial, // GTK 4 | ||
| 689 | + WantFullscreen::BeforeInitial(None), | ||
| 690 | + WantFullscreen::UnsetAfterInitial, | ||
| 691 | + // mpv, osu! | ||
| 692 | + WantFullscreen::AfterInitial(None), | ||
| 693 | + ]; | ||
| 694 | + let open_maximized = [None, Some("false"), Some("true")]; | ||
| 695 | + let want_maximized = [ | ||
| 696 | + WantMaximized::No, | ||
| 697 | + WantMaximized::UnsetBeforeInitial, | ||
| 698 | + WantMaximized::BeforeInitial, | ||
| 699 | + WantMaximized::UnsetAfterInitial, | ||
| 700 | + WantMaximized::AfterInitial, | ||
| 701 | + ]; | ||
| 702 | + | ||
| 703 | + let mut powerset = Vec::new(); | ||
| 704 | + for fs in open_fullscreen { | ||
| 705 | + for wfs in want_fullscreen { | ||
| 706 | + for tm in open_maximized { | ||
| 707 | + for wm in want_maximized { | ||
| 708 | + powerset.push((fs, wfs, tm, wm)); | ||
| 709 | + } | ||
| 710 | + } | ||
| 711 | + } | ||
| 712 | + } | ||
| 713 | + | ||
| 714 | + powerset.into_par_iter().for_each(|(fs, wfs, tm, wm)| { | ||
| 715 | + check_fullscreen_maximize(fs, wfs, tm, wm); | ||
| 716 | + }); | ||
| 717 | +} | ||
| 718 | + | ||
| 719 | +fn check_fullscreen_maximize( | ||
| 720 | + open_fullscreen: Option<&str>, | ||
| 721 | + want_fullscreen: WantFullscreen, | ||
| 722 | + open_maximized: Option<&str>, | ||
| 723 | + want_maximized: WantMaximized, | ||
| 724 | +) { | ||
| 725 | + let mut snapshot_desc = Vec::new(); | ||
| 726 | + let mut snapshot_suffix = Vec::new(); | ||
| 727 | + | ||
| 728 | + let mut config = String::from( | ||
| 729 | + r##" | ||
| 730 | +window-rule { | ||
| 731 | +"##, | ||
| 732 | + ); | ||
| 733 | + | ||
| 734 | + if let Some(x) = open_fullscreen { | ||
| 735 | + writeln!(config, " open-fullscreen {x}").unwrap(); | ||
| 736 | + | ||
| 737 | + let x = if x == "true" { "T" } else { "F" }; | ||
| 738 | + snapshot_suffix.push(format!("fs{x}")); | ||
| 739 | + } | ||
| 740 | + | ||
| 741 | + if let Some(x) = open_maximized { | ||
| 742 | + writeln!(config, " open-maximized-to-edges {x}").unwrap(); | ||
| 743 | + | ||
| 744 | + let x = if x == "true" { "T" } else { "F" }; | ||
| 745 | + snapshot_suffix.push(format!("tm{x}")); | ||
| 746 | + } | ||
| 747 | + | ||
| 748 | + config.push('}'); | ||
| 749 | + | ||
| 750 | + match &want_fullscreen { | ||
| 751 | + WantFullscreen::No => (), | ||
| 752 | + x => { | ||
| 753 | + snapshot_desc.push(format!("want fullscreen: {x}")); | ||
| 754 | + snapshot_suffix.push(format!("wfs{x}")); | ||
| 755 | + } | ||
| 756 | + } | ||
| 757 | + | ||
| 758 | + match &want_maximized { | ||
| 759 | + WantMaximized::No => (), | ||
| 760 | + x => { | ||
| 761 | + snapshot_desc.push(format!("want maximized: {x}")); | ||
| 762 | + snapshot_suffix.push(format!("wm{x}")); | ||
| 763 | + } | ||
| 764 | + } | ||
| 765 | + | ||
| 766 | + snapshot_desc.push(format!("config:{config}")); | ||
| 767 | + | ||
| 768 | + let config = Config::parse_mem(&config).unwrap(); | ||
| 769 | + | ||
| 770 | + let mut f = Fixture::with_config(config); | ||
| 771 | + f.add_output(1, (1280, 720)); | ||
| 772 | + f.add_output(2, (1920, 1080)); | ||
| 773 | + | ||
| 774 | + let id = f.add_client(); | ||
| 775 | + | ||
| 776 | + // To get output names. | ||
| 777 | + f.roundtrip(id); | ||
| 778 | + | ||
| 779 | + let client = f.client(id); | ||
| 780 | + let window = client.create_window(); | ||
| 781 | + let surface = window.surface.clone(); | ||
| 782 | + | ||
| 783 | + if let WantMaximized::UnsetBeforeInitial = want_maximized { | ||
| 784 | + client.window(&surface).unset_maximized(); | ||
| 785 | + } else if let WantMaximized::BeforeInitial = want_maximized { | ||
| 786 | + client.window(&surface).set_maximized(); | ||
| 787 | + } | ||
| 788 | + | ||
| 789 | + if let WantFullscreen::UnsetBeforeInitial = want_fullscreen { | ||
| 790 | + client.window(&surface).unset_fullscreen(); | ||
| 791 | + } else if let WantFullscreen::BeforeInitial(mon) = want_fullscreen { | ||
| 792 | + let output = mon.map(|mon| client.output(&format!("headless-{mon}"))); | ||
| 793 | + client.window(&surface).set_fullscreen(output.as_ref()); | ||
| 794 | + } | ||
| 795 | + | ||
| 796 | + client.window(&surface).commit(); | ||
| 797 | + f.roundtrip(id); | ||
| 798 | + | ||
| 799 | + let client = f.client(id); | ||
| 800 | + let initial = client.window(&surface).format_recent_configures(); | ||
| 801 | + | ||
| 802 | + if let WantMaximized::UnsetAfterInitial = want_maximized { | ||
| 803 | + client.window(&surface).unset_maximized(); | ||
| 804 | + } else if let WantMaximized::AfterInitial = want_maximized { | ||
| 805 | + client.window(&surface).set_maximized(); | ||
| 806 | + } | ||
| 807 | + | ||
| 808 | + if let WantFullscreen::UnsetAfterInitial = want_fullscreen { | ||
| 809 | + client.window(&surface).unset_fullscreen(); | ||
| 810 | + } else if let WantFullscreen::AfterInitial(mon) = want_fullscreen { | ||
| 811 | + let output = mon.map(|mon| client.output(&format!("headless-{mon}"))); | ||
| 812 | + client.window(&surface).set_fullscreen(output.as_ref()); | ||
| 813 | + } | ||
| 814 | + | ||
| 815 | + let window = client.window(&surface); | ||
| 816 | + window.attach_new_buffer(); | ||
| 817 | + let serial = window.configures_received.last().unwrap().0; | ||
| 818 | + window.ack_last_and_commit(); | ||
| 819 | + f.double_roundtrip(id); | ||
| 820 | + | ||
| 821 | + // Commit to the post-initial configures. | ||
| 822 | + let window = f.client(id).window(&surface); | ||
| 823 | + let new_serial = window.configures_received.last().unwrap().0; | ||
| 824 | + if new_serial != serial { | ||
| 825 | + window.ack_last_and_commit(); | ||
| 826 | + f.double_roundtrip(id); | ||
| 827 | + } | ||
| 828 | + | ||
| 829 | + let window = f.client(id).window(&surface); | ||
| 830 | + let post_map = window.format_recent_configures(); | ||
| 831 | + | ||
| 832 | + // If the window ended up fullscreen, unfullscreen it and output the configure. | ||
| 833 | + let mut post_unfullscreen = String::new(); | ||
| 834 | + let mapped = f.niri().layout.windows().next().unwrap().1; | ||
| 835 | + let is_fullscreen = mapped.sizing_mode().is_fullscreen(); | ||
| 836 | + let win = mapped.window.clone(); | ||
| 837 | + if is_fullscreen { | ||
| 838 | + f.niri().layout.set_fullscreen(&win, false); | ||
| 839 | + f.double_roundtrip(id); | ||
| 840 | + | ||
| 841 | + let window = f.client(id).window(&surface); | ||
| 842 | + window.ack_last_and_commit(); | ||
| 843 | + f.double_roundtrip(id); | ||
| 844 | + | ||
| 845 | + let window = f.client(id).window(&surface); | ||
| 846 | + post_unfullscreen = format!( | ||
| 847 | + "\n\nunfullscreen configure:\n{}", | ||
| 848 | + window.format_recent_configures() | ||
| 849 | + ); | ||
| 850 | + } | ||
| 851 | + | ||
| 852 | + // If the window ended up maximized, unmaximize it and output the configure. | ||
| 853 | + let mut post_unmaximize = String::new(); | ||
| 854 | + let mapped = f.niri().layout.windows().next().unwrap().1; | ||
| 855 | + let is_maximized = mapped.sizing_mode().is_maximized(); | ||
| 856 | + let win = mapped.window.clone(); | ||
| 857 | + if is_maximized { | ||
| 858 | + f.niri().layout.set_maximized(&win, false); | ||
| 859 | + f.double_roundtrip(id); | ||
| 860 | + | ||
| 861 | + let window = f.client(id).window(&surface); | ||
| 862 | + window.ack_last_and_commit(); | ||
| 863 | + f.double_roundtrip(id); | ||
| 864 | + | ||
| 865 | + let window = f.client(id).window(&surface); | ||
| 866 | + post_unmaximize = format!( | ||
| 867 | + "\n\nunmaximize configure:\n{}", | ||
| 868 | + window.format_recent_configures() | ||
| 869 | + ); | ||
| 870 | + } | ||
| 871 | + | ||
| 872 | + let snapshot = format!( | ||
| 873 | + "\ | ||
| 874 | +initial configure: | ||
| 875 | +{initial} | ||
| 876 | + | ||
| 877 | +post-map configures: | ||
| 878 | +{post_map}{post_unfullscreen}{post_unmaximize}", | ||
| 879 | + ); | ||
| 880 | + | ||
| 881 | + let mut settings = insta::Settings::clone_current(); | ||
| 882 | + settings.set_snapshot_suffix(snapshot_suffix.join("-")); | ||
| 883 | + settings.set_description(snapshot_desc.join("\n")); | ||
| 884 | + let _guard = settings.bind_to_scope(); | ||
| 885 | + assert_snapshot!(snapshot); | ||
| 886 | +} | ||
src/window/mapped.rsmodified+134 -20
| @@ -25,7 +25,7 @@ use super::{ResolvedWindowRules, WindowRef}; | |||
| 25 | use crate::handlers::KdeDecorationsModeState; | 25 | use crate::handlers::KdeDecorationsModeState; |
| 26 | use crate::layout::{ | 26 | use crate::layout::{ |
| 27 | ConfigureIntent, InteractiveResizeData, LayoutElement, LayoutElementRenderElement, | 27 | ConfigureIntent, InteractiveResizeData, LayoutElement, LayoutElementRenderElement, |
| 28 | - LayoutElementRenderSnapshot, | 28 | + LayoutElementRenderSnapshot, SizingMode, |
| 29 | }; | 29 | }; |
| 30 | use crate::niri_render_elements; | 30 | use crate::niri_render_elements; |
| 31 | use crate::render_helpers::border::BorderRenderElement; | 31 | use crate::render_helpers::border::BorderRenderElement; |
| @@ -164,6 +164,25 @@ pub struct Mapped { | |||
| 164 | /// These have been "sent" to the window in form of configures, but the window hadn't committed | 164 | /// These have been "sent" to the window in form of configures, but the window hadn't committed |
| 165 | /// in response yet. | 165 | /// in response yet. |
| 166 | uncommitted_windowed_fullscreen: Vec<(Serial, bool)>, | 166 | uncommitted_windowed_fullscreen: Vec<(Serial, bool)>, |
| 167 | + | ||
| 168 | + /// Whether this window is maximized. | ||
| 169 | + /// | ||
| 170 | + /// We have to track this ourselves in addition to the Maximized toplevel state in order to | ||
| 171 | + /// support windowed fullscreen, since in windowed fullscreen the toplevel state is always | ||
| 172 | + /// Fullscreen. So we need this variable to be able to report accurate sizing mode and pending | ||
| 173 | + /// sizing mode. | ||
| 174 | + is_maximized: bool, | ||
| 175 | + | ||
| 176 | + /// Whether this window is pending to be maximized. | ||
| 177 | + /// | ||
| 178 | + /// We have to track this ourselves due to windowed fullscreen. | ||
| 179 | + is_pending_maximized: bool, | ||
| 180 | + | ||
| 181 | + /// Pending maximized updates. | ||
| 182 | + /// | ||
| 183 | + /// These have been "sent" to the window in form of configures, but the window hadn't committed | ||
| 184 | + /// in response yet. | ||
| 185 | + uncommitted_maximized: Vec<(Serial, bool)>, | ||
| 167 | } | 186 | } |
| 168 | 187 | ||
| 169 | niri_render_elements! { | 188 | niri_render_elements! { |
| @@ -229,7 +248,7 @@ impl Mapped { | |||
| 229 | let surface = window.wl_surface().expect("no X11 support"); | 248 | let surface = window.wl_surface().expect("no X11 support"); |
| 230 | let credentials = get_credentials_for_surface(&surface); | 249 | let credentials = get_credentials_for_surface(&surface); |
| 231 | 250 | ||
| 232 | - Self { | 251 | + let mut rv = Self { |
| 233 | window, | 252 | window, |
| 234 | id: MappedId::next(), | 253 | id: MappedId::next(), |
| 235 | credentials, | 254 | credentials, |
| @@ -257,7 +276,15 @@ impl Mapped { | |||
| 257 | is_windowed_fullscreen: false, | 276 | is_windowed_fullscreen: false, |
| 258 | is_pending_windowed_fullscreen: false, | 277 | is_pending_windowed_fullscreen: false, |
| 259 | uncommitted_windowed_fullscreen: Vec::new(), | 278 | uncommitted_windowed_fullscreen: Vec::new(), |
| 260 | - } | 279 | + is_maximized: false, |
| 280 | + is_pending_maximized: false, | ||
| 281 | + uncommitted_maximized: Vec::new(), | ||
| 282 | + }; | ||
| 283 | + | ||
| 284 | + rv.is_maximized = rv.sizing_mode().is_maximized(); | ||
| 285 | + rv.is_pending_maximized = rv.pending_sizing_mode().is_maximized(); | ||
| 286 | + | ||
| 287 | + rv | ||
| 261 | } | 288 | } |
| 262 | 289 | ||
| 263 | pub fn toplevel(&self) -> &ToplevelSurface { | 290 | pub fn toplevel(&self) -> &ToplevelSurface { |
| @@ -671,12 +698,12 @@ impl LayoutElement for Mapped { | |||
| 671 | fn request_size( | 698 | fn request_size( |
| 672 | &mut self, | 699 | &mut self, |
| 673 | size: Size<i32, Logical>, | 700 | size: Size<i32, Logical>, |
| 674 | - is_fullscreen: bool, | 701 | + mode: SizingMode, |
| 675 | animate: bool, | 702 | animate: bool, |
| 676 | transaction: Option<Transaction>, | 703 | transaction: Option<Transaction>, |
| 677 | ) { | 704 | ) { |
| 678 | // Going into real fullscreen resets windowed fullscreen. | 705 | // Going into real fullscreen resets windowed fullscreen. |
| 679 | - if is_fullscreen { | 706 | + if mode == SizingMode::Fullscreen { |
| 680 | self.is_pending_windowed_fullscreen = false; | 707 | self.is_pending_windowed_fullscreen = false; |
| 681 | 708 | ||
| 682 | if self.is_windowed_fullscreen { | 709 | if self.is_windowed_fullscreen { |
| @@ -686,14 +713,27 @@ impl LayoutElement for Mapped { | |||
| 686 | } | 713 | } |
| 687 | } | 714 | } |
| 688 | 715 | ||
| 716 | + self.is_pending_maximized = mode == SizingMode::Maximized; | ||
| 717 | + if self.is_maximized != self.is_pending_maximized { | ||
| 718 | + // Make sure we receive a commit to update self.is_maximized later on. | ||
| 719 | + self.needs_configure = true; | ||
| 720 | + } | ||
| 721 | + | ||
| 689 | let changed = self.toplevel().with_pending_state(|state| { | 722 | let changed = self.toplevel().with_pending_state(|state| { |
| 690 | let changed = state.size != Some(size); | 723 | let changed = state.size != Some(size); |
| 691 | state.size = Some(size); | 724 | state.size = Some(size); |
| 692 | - if is_fullscreen || self.is_pending_windowed_fullscreen { | 725 | + |
| 726 | + if mode.is_fullscreen() || self.is_pending_windowed_fullscreen { | ||
| 693 | state.states.set(xdg_toplevel::State::Fullscreen); | 727 | state.states.set(xdg_toplevel::State::Fullscreen); |
| 728 | + state.states.unset(xdg_toplevel::State::Maximized); | ||
| 729 | + } else if mode.is_maximized() { | ||
| 730 | + state.states.unset(xdg_toplevel::State::Fullscreen); | ||
| 731 | + state.states.set(xdg_toplevel::State::Maximized); | ||
| 694 | } else { | 732 | } else { |
| 695 | state.states.unset(xdg_toplevel::State::Fullscreen); | 733 | state.states.unset(xdg_toplevel::State::Fullscreen); |
| 734 | + state.states.unset(xdg_toplevel::State::Maximized); | ||
| 696 | } | 735 | } |
| 736 | + | ||
| 697 | changed | 737 | changed |
| 698 | }); | 738 | }); |
| 699 | 739 | ||
| @@ -718,6 +758,12 @@ impl LayoutElement for Mapped { | |||
| 718 | // longer participate in any transactions with other windows. | 758 | // longer participate in any transactions with other windows. |
| 719 | self.transaction_for_next_configure = None; | 759 | self.transaction_for_next_configure = None; |
| 720 | 760 | ||
| 761 | + self.is_pending_maximized = false; | ||
| 762 | + if self.is_maximized != self.is_pending_maximized { | ||
| 763 | + // Make sure we receive a commit to update self.is_maximized later on. | ||
| 764 | + self.needs_configure = true; | ||
| 765 | + } | ||
| 766 | + | ||
| 721 | // If our last requested size already matches the size we want to request-once, clear the | 767 | // If our last requested size already matches the size we want to request-once, clear the |
| 722 | // size request right away. However, we must also check if we're unfullscreening, because | 768 | // size request right away. However, we must also check if we're unfullscreening, because |
| 723 | // in that case the window itself will restore its previous size upon receiving a (0, 0) | 769 | // in that case the window itself will restore its previous size upon receiving a (0, 0) |
| @@ -729,7 +775,9 @@ impl LayoutElement for Mapped { | |||
| 729 | let same_size = state.size.unwrap_or_default() == size; | 775 | let same_size = state.size.unwrap_or_default() == size; |
| 730 | let has_fullscreen = state.states.contains(xdg_toplevel::State::Fullscreen); | 776 | let has_fullscreen = state.states.contains(xdg_toplevel::State::Fullscreen); |
| 731 | let same_fullscreen = has_fullscreen == self.is_pending_windowed_fullscreen; | 777 | let same_fullscreen = has_fullscreen == self.is_pending_windowed_fullscreen; |
| 732 | - (same_size && same_fullscreen).then_some(*serial) | 778 | + let has_maximized = state.states.contains(xdg_toplevel::State::Maximized); |
| 779 | + let same_maximized = !has_maximized; | ||
| 780 | + (same_size && same_fullscreen && same_maximized).then_some(*serial) | ||
| 733 | }); | 781 | }); |
| 734 | 782 | ||
| 735 | if let Some(serial) = already_sent { | 783 | if let Some(serial) = already_sent { |
| @@ -766,6 +814,7 @@ impl LayoutElement for Mapped { | |||
| 766 | if !self.is_pending_windowed_fullscreen { | 814 | if !self.is_pending_windowed_fullscreen { |
| 767 | state.states.unset(xdg_toplevel::State::Fullscreen); | 815 | state.states.unset(xdg_toplevel::State::Fullscreen); |
| 768 | } | 816 | } |
| 817 | + state.states.unset(xdg_toplevel::State::Maximized); | ||
| 769 | changed | 818 | changed |
| 770 | }); | 819 | }); |
| 771 | 820 | ||
| @@ -1021,6 +1070,18 @@ impl LayoutElement for Mapped { | |||
| 1021 | self.uncommitted_windowed_fullscreen | 1070 | self.uncommitted_windowed_fullscreen |
| 1022 | .push((serial, self.is_pending_windowed_fullscreen)); | 1071 | .push((serial, self.is_pending_windowed_fullscreen)); |
| 1023 | } | 1072 | } |
| 1073 | + | ||
| 1074 | + // If is_pending_maximized changed compared to the last value that we "sent" to the | ||
| 1075 | + // window, store the configure serial. | ||
| 1076 | + let last_sent_maximized = self | ||
| 1077 | + .uncommitted_maximized | ||
| 1078 | + .last() | ||
| 1079 | + .map(|(_, value)| *value) | ||
| 1080 | + .unwrap_or(self.is_maximized); | ||
| 1081 | + if last_sent_maximized != self.is_pending_maximized { | ||
| 1082 | + self.uncommitted_maximized | ||
| 1083 | + .push((serial, self.is_pending_maximized)); | ||
| 1084 | + } | ||
| 1024 | } else { | 1085 | } else { |
| 1025 | self.interactive_resize = match self.interactive_resize.take() { | 1086 | self.interactive_resize = match self.interactive_resize.take() { |
| 1026 | // We probably started and stopped resizing in the same loop cycle without anything | 1087 | // We probably started and stopped resizing in the same loop cycle without anything |
| @@ -1034,23 +1095,51 @@ impl LayoutElement for Mapped { | |||
| 1034 | self.transaction_for_next_configure = None; | 1095 | self.transaction_for_next_configure = None; |
| 1035 | } | 1096 | } |
| 1036 | 1097 | ||
| 1037 | - fn is_fullscreen(&self) -> bool { | 1098 | + fn sizing_mode(&self) -> SizingMode { |
| 1038 | if self.is_windowed_fullscreen { | 1099 | if self.is_windowed_fullscreen { |
| 1039 | - return false; | 1100 | + return if self.is_maximized { |
| 1101 | + SizingMode::Maximized | ||
| 1102 | + } else { | ||
| 1103 | + SizingMode::Normal | ||
| 1104 | + }; | ||
| 1040 | } | 1105 | } |
| 1041 | 1106 | ||
| 1042 | - self.toplevel().with_committed_state(|current| { | 1107 | + self.toplevel().with_committed_state(|state| { |
| 1043 | - current.is_some_and(|s| s.states.contains(xdg_toplevel::State::Fullscreen)) | 1108 | + // This must always be Some() for mapped windows. However, this function is called on |
| 1109 | + // the code path when removing a just-unmapped window in the commit handler, at which | ||
| 1110 | + // point state is already None. | ||
| 1111 | + let Some(state) = state else { | ||
| 1112 | + return SizingMode::Normal; | ||
| 1113 | + }; | ||
| 1114 | + | ||
| 1115 | + if state.states.contains(xdg_toplevel::State::Fullscreen) { | ||
| 1116 | + SizingMode::Fullscreen | ||
| 1117 | + } else if state.states.contains(xdg_toplevel::State::Maximized) { | ||
| 1118 | + SizingMode::Maximized | ||
| 1119 | + } else { | ||
| 1120 | + SizingMode::Normal | ||
| 1121 | + } | ||
| 1044 | }) | 1122 | }) |
| 1045 | } | 1123 | } |
| 1046 | 1124 | ||
| 1047 | - fn is_pending_fullscreen(&self) -> bool { | 1125 | + fn pending_sizing_mode(&self) -> SizingMode { |
| 1048 | if self.is_pending_windowed_fullscreen { | 1126 | if self.is_pending_windowed_fullscreen { |
| 1049 | - return false; | 1127 | + return if self.is_pending_maximized { |
| 1128 | + SizingMode::Maximized | ||
| 1129 | + } else { | ||
| 1130 | + SizingMode::Normal | ||
| 1131 | + }; | ||
| 1050 | } | 1132 | } |
| 1051 | 1133 | ||
| 1052 | - self.toplevel() | 1134 | + self.toplevel().with_pending_state(|state| { |
| 1053 | - .with_pending_state(|state| state.states.contains(xdg_toplevel::State::Fullscreen)) | 1135 | + if state.states.contains(xdg_toplevel::State::Fullscreen) { |
| 1136 | + SizingMode::Fullscreen | ||
| 1137 | + } else if state.states.contains(xdg_toplevel::State::Maximized) { | ||
| 1138 | + SizingMode::Maximized | ||
| 1139 | + } else { | ||
| 1140 | + SizingMode::Normal | ||
| 1141 | + } | ||
| 1142 | + }) | ||
| 1054 | } | 1143 | } |
| 1055 | 1144 | ||
| 1056 | fn is_ignoring_opacity_window_rule(&self) -> bool { | 1145 | fn is_ignoring_opacity_window_rule(&self) -> bool { |
| @@ -1062,8 +1151,8 @@ impl LayoutElement for Mapped { | |||
| 1062 | } | 1151 | } |
| 1063 | 1152 | ||
| 1064 | fn expected_size(&self) -> Option<Size<i32, Logical>> { | 1153 | fn expected_size(&self) -> Option<Size<i32, Logical>> { |
| 1065 | - // We can only use current size if it's not fullscreen. | 1154 | + // We can only use current size if it's not maximized or fullscreen. |
| 1066 | - let current_size = (!self.is_fullscreen()).then(|| self.window.geometry().size); | 1155 | + let current_size = (self.sizing_mode().is_normal()).then(|| self.window.geometry().size); |
| 1067 | 1156 | ||
| 1068 | // Check if we should be using the current window size. | 1157 | // Check if we should be using the current window size. |
| 1069 | // | 1158 | // |
| @@ -1100,6 +1189,9 @@ impl LayoutElement for Mapped { | |||
| 1100 | server_pending | 1189 | server_pending |
| 1101 | .states | 1190 | .states |
| 1102 | .contains(xdg_toplevel::State::Fullscreen), | 1191 | .contains(xdg_toplevel::State::Fullscreen), |
| 1192 | + server_pending | ||
| 1193 | + .states | ||
| 1194 | + .contains(xdg_toplevel::State::Maximized), | ||
| 1103 | )); | 1195 | )); |
| 1104 | } | 1196 | } |
| 1105 | 1197 | ||
| @@ -1113,13 +1205,20 @@ impl LayoutElement for Mapped { | |||
| 1113 | Some(( | 1205 | Some(( |
| 1114 | state.size.unwrap_or_default(), | 1206 | state.size.unwrap_or_default(), |
| 1115 | state.states.contains(xdg_toplevel::State::Fullscreen), | 1207 | state.states.contains(xdg_toplevel::State::Fullscreen), |
| 1208 | + state.states.contains(xdg_toplevel::State::Maximized), | ||
| 1116 | )) | 1209 | )) |
| 1117 | }) | 1210 | }) |
| 1118 | }); | 1211 | }); |
| 1119 | 1212 | ||
| 1120 | - if let Some((mut size, fullscreen)) = pending { | 1213 | + if let Some((mut size, fullscreen, maximized)) = pending { |
| 1121 | - // If the pending change is fullscreen, we can't use that size. | 1214 | + // If the pending change is maximized or fullscreen, we can't use that size. |
| 1122 | - if fullscreen && !self.is_pending_windowed_fullscreen { | 1215 | + // |
| 1216 | + // Pending windowed fullscreen is good (means not real fullscreen), unless it's also | ||
| 1217 | + // pending maximized (means maximized windowed fullscreen, so maximized size, bad). | ||
| 1218 | + if maximized | ||
| 1219 | + || (fullscreen | ||
| 1220 | + && (!self.is_pending_windowed_fullscreen || self.is_pending_maximized)) | ||
| 1221 | + { | ||
| 1123 | return None; | 1222 | return None; |
| 1124 | } | 1223 | } |
| 1125 | 1224 | ||
| @@ -1157,8 +1256,13 @@ impl LayoutElement for Mapped { | |||
| 1157 | self.toplevel().with_pending_state(|state| { | 1256 | self.toplevel().with_pending_state(|state| { |
| 1158 | if value { | 1257 | if value { |
| 1159 | state.states.set(xdg_toplevel::State::Fullscreen); | 1258 | state.states.set(xdg_toplevel::State::Fullscreen); |
| 1259 | + state.states.unset(xdg_toplevel::State::Maximized); | ||
| 1160 | } else { | 1260 | } else { |
| 1161 | state.states.unset(xdg_toplevel::State::Fullscreen); | 1261 | state.states.unset(xdg_toplevel::State::Fullscreen); |
| 1262 | + | ||
| 1263 | + if self.is_pending_maximized { | ||
| 1264 | + state.states.set(xdg_toplevel::State::Maximized); | ||
| 1265 | + } | ||
| 1162 | } | 1266 | } |
| 1163 | }); | 1267 | }); |
| 1164 | 1268 | ||
| @@ -1237,5 +1341,15 @@ impl LayoutElement for Mapped { | |||
| 1237 | true | 1341 | true |
| 1238 | } | 1342 | } |
| 1239 | }); | 1343 | }); |
| 1344 | + | ||
| 1345 | + // "Commit" our "acked" pending maximized state. | ||
| 1346 | + self.uncommitted_maximized.retain_mut(|(serial, value)| { | ||
| 1347 | + if commit_serial.is_no_older_than(serial) { | ||
| 1348 | + self.is_maximized = *value; | ||
| 1349 | + false | ||
| 1350 | + } else { | ||
| 1351 | + true | ||
| 1352 | + } | ||
| 1353 | + }); | ||
| 1240 | } | 1354 | } |
| 1241 | } | 1355 | } |
src/window/mod.rsmodified+8 -0
| @@ -61,6 +61,9 @@ pub struct ResolvedWindowRules { | |||
| 61 | /// Whether the window should open full-width. | 61 | /// Whether the window should open full-width. |
| 62 | pub open_maximized: Option<bool>, | 62 | pub open_maximized: Option<bool>, |
| 63 | 63 | ||
| 64 | + /// Whether the window should open maximized to edges (true maximized). | ||
| 65 | + pub open_maximized_to_edges: Option<bool>, | ||
| 66 | + | ||
| 64 | /// Whether the window should open fullscreen. | 67 | /// Whether the window should open fullscreen. |
| 65 | pub open_fullscreen: Option<bool>, | 68 | pub open_fullscreen: Option<bool>, |
| 66 | 69 | ||
| @@ -180,6 +183,7 @@ impl ResolvedWindowRules { | |||
| 180 | open_on_output: None, | 183 | open_on_output: None, |
| 181 | open_on_workspace: None, | 184 | open_on_workspace: None, |
| 182 | open_maximized: None, | 185 | open_maximized: None, |
| 186 | + open_maximized_to_edges: None, | ||
| 183 | open_fullscreen: None, | 187 | open_fullscreen: None, |
| 184 | open_floating: None, | 188 | open_floating: None, |
| 185 | open_focused: None, | 189 | open_focused: None, |
| @@ -300,6 +304,10 @@ impl ResolvedWindowRules { | |||
| 300 | resolved.open_maximized = Some(x); | 304 | resolved.open_maximized = Some(x); |
| 301 | } | 305 | } |
| 302 | 306 | ||
| 307 | + if let Some(x) = rule.open_maximized_to_edges { | ||
| 308 | + resolved.open_maximized_to_edges = Some(x); | ||
| 309 | + } | ||
| 310 | + | ||
| 303 | if let Some(x) = rule.open_fullscreen { | 311 | if let Some(x) = rule.open_fullscreen { |
| 304 | resolved.open_fullscreen = Some(x); | 312 | resolved.open_fullscreen = Some(x); |
| 305 | } | 313 | } |
src/window/unmapped.rsmodified+11 -0
| @@ -21,6 +21,9 @@ pub enum InitialConfigureState { | |||
| 21 | NotConfigured { | 21 | NotConfigured { |
| 22 | /// Whether the window requested to be fullscreened, and the requested output, if any. | 22 | /// Whether the window requested to be fullscreened, and the requested output, if any. |
| 23 | wants_fullscreen: Option<Option<Output>>, | 23 | wants_fullscreen: Option<Option<Output>>, |
| 24 | + | ||
| 25 | + /// Whether the window requested to be maximized. | ||
| 26 | + wants_maximized: bool, | ||
| 24 | }, | 27 | }, |
| 25 | /// The window has been configured. | 28 | /// The window has been configured. |
| 26 | Configured { | 29 | Configured { |
| @@ -64,6 +67,13 @@ pub enum InitialConfigureState { | |||
| 64 | 67 | ||
| 65 | /// Workspace to open this window on. | 68 | /// Workspace to open this window on. |
| 66 | workspace_name: Option<String>, | 69 | workspace_name: Option<String>, |
| 70 | + | ||
| 71 | + /// Whether the window should be maximized. | ||
| 72 | + /// | ||
| 73 | + /// This corresponds to the window having the Maximized toplevel state. However, if the | ||
| 74 | + /// window is also pending fullscreen, then it has the Fullscreen toplevel state, so we | ||
| 75 | + /// need to store pending maximized elsewhere, hence this field. | ||
| 76 | + is_pending_maximized: bool, | ||
| 67 | }, | 77 | }, |
| 68 | } | 78 | } |
| 69 | 79 | ||
| @@ -74,6 +84,7 @@ impl Unmapped { | |||
| 74 | window, | 84 | window, |
| 75 | state: InitialConfigureState::NotConfigured { | 85 | state: InitialConfigureState::NotConfigured { |
| 76 | wants_fullscreen: None, | 86 | wants_fullscreen: None, |
| 87 | + wants_maximized: false, | ||
| 77 | }, | 88 | }, |
| 78 | activation_token_data: None, | 89 | activation_token_data: None, |
| 79 | } | 90 | } |