* Fix group members not having uniform size when FSed
* fix the same bug - but for scrolling
* format
* fix include
* ditto
* groups are evil
* format
* TEST - Default handled FS -- tested in dwindle
Co-authored-by: Aqa-Ib <16420574+Aqa-Ib@users.noreply.github.com>
* TEST - Default handled FS -- tested in scrolling
Co-authored-by: Aqa-Ib <16420574+Aqa-Ib@users.noreply.github.com>
* TEST - layout handled FS -- Scrolling
Co-authored-by: Aqa-Ib <16420574+Aqa-Ib@users.noreply.github.com>
* format and comment fix
* spelling is hard
* slight fix for posterity
* spelling is very hard
* thankyouclangdverycool
* revert change that made all windows in a group show up as FS in hyprctl clients
* change test to reflect the reversion
* mirror mirror can you tell me who forgot to revert that change after it was redundant?
* tribute to the magic mirror
* clean up includes
* format
* Hope is the first step on the road to disappointment
Fix tests failing
---------
Co-authored-by: Aqa-Ib <16420574+Aqa-Ib@users.noreply.github.com>
* fix test passing only inconsistently - use acceptsInput to test since `visible` and `hidden` are unreliable
* comment fix
* remove residual sync calls
* window() already gets the current window
* fix layer invisibility when infullscreening
* format
* smol fix for loop early return
* add current alpha value of layers to `hyprctl layers`
* spacing is hard
* Test - Both default and scrolling
* use .goal() not .value(). also clamp for inf case
* `syncTargetSizeAndPosition()`: use .goal() only as .value() will be overwritten anyway
* Refactor FS related functions in place
Integrate layout managed FS logic
m_overFullscreen -> m_allowedOverFullscreen
Rework its logic
add `FULLSCREEN_REQUEST_FAILED`
Rework scrolling FS
Improve Scrolling FS floating window hiding logic
Fix many bugs with scrolling FS
General refactoring:
move `syncFullscreenTargets` near `clearFullscreenTarget`. Logically grouped so should be next to each other in decleration and definition
handle maximising a fullscreen window and vice versa in scrolling: save the original col width of the col before initial fullscreen/maximise.
Create `getTargetColumnWidthBeforeFullscreen()` to facilitate that
enhance scrolling's `requestFullscreen()`
extract default handled FS behaviour into its own requestFullscreen function.
work on scrolling data's recalculate, algo's recalculate, default handled fullscreen real and logical position setting
work on updatePos()
reimplement `isFullscreen()` for CWindow
disptach maximised windows' calls to maximise specific function - for scrolling it makes no difference now but it might in the future
implement `CWindowGroupTarget::isFullscreen()`
implement `CWindowTarget::isFullscreen()`
reimpl `CWorkspace::getFullscreenWindow()`, `CWorkspace::hasFullscreen()`
Other misc. refactors, cleanu-ups- improvements
* Create Fullscreen Controller, Create default and scrolling Fullscreen handlers
Initially implement some simple getter-setter methods for the controller
* change name of `CWorkspace::getWindows` to `CWorkspace::getWindowCount` -> getWindows makes it sound like you're getting the list of windows, not their count
* create CWorkspace::getWindows()`: get list of all windows in workspace
* Draw the full framework for Controller and Default FS Handler.
* Monitor.hpp was moved, readd the comment adjustment after rebase.
* Implement ownership of FS handler for layout algorithms.
Handler keeps a reference to the algo they are assinged to
* add `Fullscreen::IFullscreenHandler` as friend class to `IModeAlgorithm` - Allow access to private/protected members (m_parent)
initialize raw ptr with nullptr
* change "get all windows in workspace" code in various parts of the codebase with the new `workspace.getWindows` method. Will make it more efficient to iterate over all windows in a workspace (prevent getting all windows and dismissing those not in the current/target workspace)
* remove FS related attributes from CWindow and CWorkspace (not all, some do double duty, some have to do with window rules, etc...)
* rework ownership of FS handler: IModeAlgorithm hold the default handler; layouts that implement their own custom handlers overwrite the attribute in IModeAlgo object
use `getWindows()` in CScrollingAlgorithm.cpp
move some function implementations in IModeAlgorithm to the default FS handler - work in progress
* refine controller and handler.
Implement in the default FS handler: `isFullscreen`, `hasFullscreen`, `getFullscreen`, `requestFullscreen`, `setWindowFullscreenModeInternal`, `setWindowFullscreenModeClient`, `setNoMembersAboveFullscreen`, `getFullscreenHandlerName`, `getSpace`, `removeCurrentFullscreenWindow`
* make `SWindowFullscreenState` hashable
* Define ScrollingFullscreenHandler
Slightly change m_algorithm handling logic for FS handler
* clean up includes
* partially implement Scrolling's FS handler
* work on default Fs handler
* clang-format
* Work on Scrolling FS Handler - move a great deal of FS related code from `ScrollingAlgorithm` to `ScrollingFullscreenHandler` - much of it is pending reimplementation
comment out/remove legacy FS code in many places.
Formatting in some places
* work on scrolling's FS handler
some improvements to default FS handler
commenting out some code here and there - they will be moved to FS controller eventually; LSP has to pick up that they're no longer defined for now
* many logic and bug fixes
* Make FS handlers able to handle `ITarget`s instead of only CWindows
* make scrolling Make FS handler able to handle ITargets instead of only CWindows
remove some commented code in scroll handler
clean up and correct some logic errors
* move some FS related code from SScrollingData::recalculate to sScrollingDataRecalculateHelper in scrolling FS handler
some refactoring in sScrollingDataRecalculateHelper to make it work with the new FS framework
Rename m_fullscreenHandler -> m_defaultFullscreenHandler
If layouts want to own FS semantics and need helper methods they need to access from outside the FS helper, they should save their own FS handlers as a separate attribute.
Scrolling is a working template for this
misc. refactoring
* Rename removeTargetFromHandler -> removeFsTarget
improve removeFsTarget
* static_cast to dynamic_cast
* fix log::crit being used where err suffices - throw runtime err in crit case
* add `getFSHandler()` to IModeAlgo and CScrollingAlgo
Work on FS controller - implement FS state getter functions
misc. refactor, cleanup
* explicit (de)constructor for controller
* change raw pointer use to WP<>
Start implementing FS state setters in controller
misc: fix bugs
* Lay the groundwork for implementing the ability to choose to default FS windows on workspaces with layouts that have custom FS behaviour
This commit is mainly selectively moving some code from https://github.com/hyprwm/Hyprland/pull/14341 to this PR for ease of future implementation of the feature.
* work on controller
* remove circular include
* implement FS state setters in controller
delete a lot of commented out code that was scheduled for removal
remove FS state setter functions that were moved to controller.
general clanup
* fix
* remove some legacy FS code, clean up commented out code
* fix logic errors in controller, rework some methods.
general polish
add comments - both todo and method descriptions
* rework Controller. again.
* add back FSMODE_MAX, turn eFullscreenMode back into bitmap
* Replacing calls to legacy functions with new function - part 1
Fix isFullscreen() logic in controller
Rename a method in controller
minor misc. tweaks
minor logic/bug fixes
* Controller/Handlers: getFullscreenMode -> getFullscreenMode
* getFullscreenMode -> getFullscreenMode
* Replacing calls to legacy functions with new function - part 2
* Replacing calls to legacy functions with new function - partial (upstream refactors will introduce more)
Fix: more pointer stuff
* add null guards to controller
fix more missing negations
* go over the whole MR - correct a lot of bugs and refine a lot of code
* catch up with upstream - part 1
* catch up with upstream - part 2
add getParent to Fs default handler
* catch up with upstream - part 3
* Import the changes from
https://github.com/hyprwm/Hyprland/pull/15226https://github.com/hyprwm/Hyprland/pull/13790
FS functions are moved so need to manually do this for 13790
15226 is changed to use the controller method
* fix
* mroe fix
* fix updatePos() logic
* fix groups in scrolling
* Allow for default FSing windows in layout handled workspaces
* fix
* move some code from old impl to new
* fix window invisible on open
* pain
* fix FSing default handled groups
* clean up updatePos() - get rid of hack
* fix window rules - scrolling
* work on controller
* codex bug-report fixes
fix Sync client-only fullscreen requests into internal mode
fix Return client-only fullscreen state
fix Ignore client-only entries when hiding windows
* refine framework for adding FS non-layout FS handlers
* Handle FSMODE_MAX case: client Fullscreening a window when it's internal is Maximised
* fix default handled FS - FS window take-over
* fix fullscreen dispatcher
* fix toggle action
* add `fullscreenHandler` to hyprctl and `fullscreen_handler` to lua window class
* fix scrolling save original col width if target was already fullscreen logic - allow non-covering column to work with it
* fix viewport not aligned upon scrolling Fullscreen window unFullscreened
* post rebase fixes
* post rebase fixes
some cleanup
* snowmanfixthis
* monitor set tweaks
* snowmanplsfix
* fix floating window groups
* clang-format
* replace g_pfullscreenController with Fullscreen::controller()
* Implement Error Detection and Correction in Controller
misc logic fixes
misc comment fixes
* fix floating-tiling FS window related bugs
* Tests - add file for monocle layout
* animations fix
* properly handle window position/size setting with FS - update values with window/workspace rules correctly and don't rely hacks like couning on an algo's recalculate() calls to set pos/size (dwindle, master, monocle) unless especially designed to (scrolling).
* Tests - groundwork for default FS testing.
* clang-format
* fix lua binding
* misc. comments
* fix window pos setting - skip re-setting FS windows' positions after they are set
* format
* fix
* the omnissiah decrees: Clarify comments, Explicitly handle setting Maximised Window Gloabal Pos to avoid spagetti and have clear separation of intent.
Praise be to the omnissiah praise be to the machine god.
* ispenttoolongonthis: emit window open event before FS setter calls so that the window has decorations values that are used to get reserved area for maximised windows.
FS setting is to be a self-contained operation that doesn't rely on its necessary values being set 'incidentally' elsewhere by relatively unrelated function calls.
FS setters are to refresh all values that an FS window may use for its FS operations themselves.
* fix scrolling test - Test was validating incorrect size setting behaviour - fixed that so fix the test too
* Tests - implement the following tests for all algorithms (deafult handlers):
- FullscreenMaximiseDispatchers
- TestFsFocusUnderFSWindow
Some misc renaming of tests to conform to a new converntion for FS tests
* remove FSMODE_MAX as a user-settable option
* Tests - adjust some tests to not include `Fs Mode mode = 3` logic
* clang-format
* Tests - Add the following Deafult Handled FS test to all layouts: `NewWindowTakesOverFullscreen`
* Tests - Add the following Deafult Handled FS test to all layouts: `ExitWindowRetainsFullscreen`
* fix sync FS mistakenly settings client mode when FS request a pinned window with `allow_pin_fullscreen = false`
* more work on fixing pinned Fs window logic
* Tests - Add the following Deafult Handled FS test to all layouts: `FullscreenPinnedWindows`
* Tests - Add the following Deafult Handled FS test to all layouts: `FullscreenNonInterference`
* layout handler is a property, not visible to the user
* Tests - Add test for selecting correct Fs handler and visibility to the user via hyprctl
* misc scrolling test fix
* fix for FS cycle on default handled FS
* Tests - Scrolling Layout Handled FS Custom Window Hiding Logic Test
* cleanup
* make error checking more robust, auto-handle more error cases in scrolling
* clean-up - pass 1
* add more redundancy
* clean-up - pass 2
* fixes to error correctors
* clang-format
remove comment to self
* add `pinFullscreened` to hyprctl and lua
* Testing - adjust tests to use the newly added hyprctl output, some fixes for pinned window handling
* clean up compositor includes
* comment cleanup - 1
* comment cleanup - 2
* format
* comment cleanup - 3
format
* Better handle sending FS windows btw workspaces
Fix spelling mistake
* Tests - Test moving windows btw workspaces; tiled(default, layout), floating
* comment cleanup - 4
format
* review fixes: Helper functions, Controller Cleanup
Extract FS handler getting from workspace into its own helper function
Extract active workspace getting into its own helper function
Remove a bunch of redundant null checks in functions as a result of the above 2 changes
DSO -> DS
* fix `-1` case
fix FSMODE_MAX bug
fix short if braces
* ihearthatspacingisimportantidontknowifitistrue - fix some spacing inconsistency, fix spelling mistake, add null check for handlers to `getFsHandlersForWorkspace`, clarification comment for `getCurrentWorkspace()`, format
* format
* review fixes: JSON parsing
* adjust rebase
* ":" -> "":
* review fixes:
VRR in def handler
FS layout handled state preserved on FS window unmap
Groups adding to group maintains group's layout FS handler state
* allow default handled maximise to conform to changing work area.
Scrolling already does because its pos setting happens in its recalc.
* review fixes:
- Initalise Vars
- respect VRR config opts in recalc setting VRR if scrolling onto or have a new FS window
* Handle dynamic work area changes
Replace all calls to default handler from algorithms with controller() calls that include error correction logic - Scrolling is an exception as its handling is radically different
Extract repeated code into helper
Fix minor bugs
* fix scrolling groups bug
* better handle hiding underlying FS windows in scrolling
Adjust test to reflect this change
* Revert https://github.com/hyprwm/Hyprland/pull/14594
* add `executeScheduledRefreshImmediately()`, `refreshProp()`
* add exec_scheduled_prop_refresh_immediately helper function
* add event
add return value for exec_scheduled_prop_refresh_immediately
* format
* test
* set maximise fullscreen_state internal
* maximise also setLayoutManagedFullscreen
Adjust uses of the function to work with change
* Adapted to work with both FS and MAXIMISED:
syncFullscreenTargets() --> syncs both types of FS mode targets
fullscreenStateForTarget() -> gets the FSState of a window of a certain FSMode
fullscreenStateForData() -> similar to above
requestFullscreen():
-> saves the col of maximised windows.
-> centerOrFit the Maximised window
* handle Maximise
* maximise restores size
* note a bug location
* remove redudancies, add comment
* cleanup
* fix gaps with maximise.
format
* maximise test
* fix floating FS window not able to be FSed when a tiled window is FSed
* format
* fix bug shared column bugs
* differentiate RECALCULATE_REASON_TOGGLE_FULLSCREEN into default and layout handled reasons.
* fix
* add layout handled fs reason as not a hard focus reason. fullscreen handler fits the col to view anyway
* clang-format
* fix scrolling view move when a grouped window is closed - prevent redundant space assignment for a grouped window that's about to be unmapped, add a `FOCUS_REASON` for unmapping grouped windows
* fix focus_fallback after unmapping a window floating moving view
* fix view change when changing workspaces (special and normal).
add an optional `RECALCULATE_REASON` parameter to `recalculate()` calls of all algorithms.
add an optional `RECALCULATE_MONITOR_REASON` parameter to `recalculateMonitor()` calls.
add 2 new `FOCUS_REASON`s, for workspace change and special workspace toggle
* Fix hyprctl keyword causing scrolling view move.
rename INPUT_MODE_KB to INPUT_MODE_HARD since it seems to have little to do with keybinds
* fix fullscreen/maximise moving the scrolling view
* fix opening of layer 3 programs moving scrolling view
* refactor, clean up and clang-format
* fix bad decisions
* fix includes, clang-format.
* remove TODO
* `focuswindow` no longer moves scrolling view when `follow_focus = 0`
* fix: changes in a group's current window no longer casues scrolling view shift when `follow_focus = 0`
* fix: `moveintogroup`, `movewindoworgroup` no longer causes scrolling view change if `follow_focus = 0`
* clang-format
* add `RECALCULATE_REASON_UNKNOWN`, `RECALCULATE_MONITOR_REASON_UNKNOWN`, `REMOVE_FROM_GROUP_REASON_UNKNOWN`
remove optional wrapper from their enums, refactor code to work with the change
* dispatches that call `switchtoWindow()` in CKeybindManager no longer cause scrolling view to move if `follow_focus = 0`.
They still cause the move if `follow_focus = 1`
Dispatches effected by this: `movefocus`, `cyclenext`, `focuscurrentorlast`, `focuscurrentorurgent`
* Fix for Lua: switchToWondow
* Fix for Lua: focus({window})
* Fix for Lua: Move Window Into Group
* clang-format
* Drop `hyprctl keyword` change
* test: `focus({window})` with `follow_focus = false`
* test: `focus({window})` with `follow_focus = true`
* test: test Focus Fallback
* test: Focus Fallback with groups
* test: workspace change
* test: special workspace toggle
* test: workspace change - special to special
also minor refactoring
* test: close window in a group
* test: move window into group `follow_focus = false`
minor fix in test: expect -> assert
* test: move window into group `follow_focus = true`
* test: new layer
* test: maximise
fix in test: expect to assert.
* test: fullscreen
* test: `dispatch window.focus({ direction })` when `follow_focus = false`
* test: `dispatch window.focus({ direction })` when `follow_focus = true`
test-fix: expect -> assert
* test: move focus within group when `follow_focus = false`
* test: move focus within group when `follow_focus = true`
* test-fix: kill all layers before killing all windows in layers test. prevents internal post test cleanup function failing to kill all layers
test-fix: maximized and fullscreen swapped between their tests
test-fix: testScrollingViewBehaviourMoveFocusInGroupFollowFocusTrue missing layout initialization
test-fix: testScrollingViewBehaviourWorkspaceChange, testScrollingViewBehaviourCloseWindowInGroup have stale window class in a comment
clang-format
* catch up with main: move to new test function
* clean-up the clean-up part of the tests: redundant
* clang-format
* pain
* suffering: fix rebase fail
* test: manually kill all layers since the cleanup function fails
* remove test: fullscreen and maximise. scrolling has its own behaviour now