summaryrefslogtreecommitdiff
path: root/src/layout
Commit message (Collapse)AuthorAgeFilesLines
* groups: fix swallowing (#8223)Aqa-Ib2024-10-271-18/+13
| | | | | | | | | | | | | * fix swallowing for groups * remove unnecessary check * clang-format * clarify comment * make variables consistent * make aditional variables consistent
* groups: add group_on_movetoworkspace (#8159)Aqa-Ib2024-10-231-2/+3
|
* input: add snapping to floating windows (#8088)Mike Will2024-10-212-9/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add snapping to floating windows Works for both moving and resizing of windows. It comes with 3 options: `general:snap:enabled` - whether it's enabled, off by default `general:snap:window_gap` - minimum gap in pixels between windows before snapping. Setting to 0 effectively turns off this method of snapping. `general:snap:monitor_gap` - minimum gap in pixels between window and monitor edges before snapping. Again, setting it to 0 effectively turns it off. * snap: add more ignore criteria and change if clause into a guard * snap: refactor code * snap: new refactoring approach and account for border size * snap: do corner snapping after all edge snapping is done The approach of performing corner snaps after each individual edge snap results in far fewer scenarios where snapping can occur. After trying it out for a while, I found that I prefer an approach that's more prone to snapping. * snap: combine snapWindows and snapMonitor into a single function * snap: add forced aspect ratio functionality * snap: avoid directly referring to border_size config value * snap: address vaxerski feedback - add new line between functions - use std::function typedef for SnapFn and make snap functions static - avoid uninitialized variable declarations. - change ignore condition m_bIsX11 to isX11OverrideRedirect() - use braces for CBox and Vector2D declarations. - add SNAP_INVALID to eSnapEdge enum - use bitshift notation for eSnapEdge and eRectCorner - make performSnap a non-member function. * snap: add corner-snapping to forced aspect ratio mode
* internal: Move CMonitor to SP (#8178)Vaxry2024-10-192-8/+6
| | | | | * move monitors to sp * XD
* layout: move applyGroupRules() to onWindowCreated() (#8139)Aqa-Ib2024-10-163-9/+4
|
* layout: enable group rules for new floating windows (#8122)Aqa-Ib2024-10-161-1/+3
| | | | | | | | | | * layout: enable group rules for new floating windows * fix comment * do not apply group rules to a new floating window if it shouldBeFloated. fixes child windows * comment
* layout: simplify the conditions to autogroup (#8120)Aqa-Ib2024-10-141-5/+3
|
* layout: deny auto-grouping a new floating window into a tiled group (#8108)Aqa-Ib2024-10-141-6/+11
|
* config/layout: nuke no_gaps_when_only (#8072)Vaxry2024-10-112-51/+9
|
* layout: remove unnecessary check after 45e8219 (#8037)Aqa-Ib2024-10-081-6/+6
|
* layout: add drag_into_group to control merging dragging windows (#8004)Aqa-Ib2024-10-081-21/+44
|
* layout: fix auto group when opening a new window in a non-focused workspace ↵Aqa-Ib2024-10-071-14/+15
| | | | using window rules (#8006)
* layout: fix dragging a window into a group after e242694 (#7976)Aqa-Ib2024-10-021-2/+2
|
* layout: add auto_group to control default grouping (#7883)Aqa-Ib2024-10-024-53/+58
|
* dwindle: add movetoroot method to layout messages (#7903)Luke Chen2024-09-292-0/+43
|
* dwindle: add config option `split_bias` (#7920)Mike Will2024-09-281-1/+7
| | | | | | | | If `default_split_ratio` is greater than 1.0, `split_bias` will give the bigger half to a specific window: 0 - positional (default) 1 - current window 2 - opening window
* window/xwayland: minor property cleanupVaxry2024-08-301-7/+7
| | | | fixes #6921
* misc: constify the remaining for loops (#7534)Tom Englund2024-08-263-10/+10
| | | now we roll loops at blazing constified speed.
* core: make most for loops use const references (#7527)Tom Englund2024-08-263-6/+6
| | | | why not let the compiler optimise things for us at hyprspeeds when we can.
* decorations: fix manual resize not recalculating decos (#7323)MightyPlaza2024-08-132-0/+4
| | | | modified: src/layout/DwindleLayout.cpp modified: src/layout/MasterLayout.cpp
* internal: introduce new types to avoid unsigned int rollover and signed int ↵Tom Englund2024-08-085-25/+25
| | | | | | | | | | | | | | | | | | | | overflow (#7216) * framebuffer: avoid gluint overflow GLuint was being initialized to -1 and rolling over to unsigned int max, its defined behaviour but very unnecessery. add a bool and use it for checking if allocated or not. * opengl: avoid gluint rollover -1 rolls over to unsigned int max, use 0xFF instead. * core: big uint64_t to int type conversion there were a few uint64_t to int implicit conversions overflowing int and causing UB, make all monitor/workspaces/windows use the new typedefs. also fix the various related 64 to 32 implicit conversions going around found with -Wshorten-64-to-32
* decorations: fix infinite recursion on no_gaps when only (#7169)MightyPlaza2024-08-032-6/+4
| | | | | modified: src/layout/DwindleLayout.cpp modified: src/layout/MasterLayout.cpp modified: src/render/decorations/CHyprBorderDecoration.cpp
* internal: fix fullscreen typos (#7134)MightyPlaza2024-08-011-1/+1
| | | | modified: src/events/Windows.cpp modified: src/layout/DwindleLayout.cpp
* internal: refactor fullscreen states (#7104)MightyPlaza2024-07-316-119/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor fullscreen modified: src/Compositor.cpp modified: src/Compositor.hpp modified: src/config/ConfigManager.cpp modified: src/config/ConfigManager.hpp modified: src/debug/HyprCtl.cpp modified: src/desktop/LayerSurface.cpp modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/desktop/Workspace.cpp modified: src/desktop/Workspace.hpp modified: src/events/Windows.cpp modified: src/helpers/Monitor.cpp modified: src/layout/DwindleLayout.cpp modified: src/layout/DwindleLayout.hpp modified: src/layout/IHyprLayout.cpp modified: src/layout/IHyprLayout.hpp modified: src/layout/MasterLayout.cpp modified: src/layout/MasterLayout.hpp modified: src/managers/KeybindManager.cpp modified: src/managers/KeybindManager.hpp modified: src/managers/input/IdleInhibitor.cpp modified: src/managers/input/InputManager.cpp modified: src/managers/input/Swipe.cpp modified: src/protocols/ForeignToplevelWlr.cpp modified: src/render/Renderer.cpp modified: src/render/decorations/CHyprGroupBarDecoration.cpp * clean up modified: src/config/ConfigManager.cpp modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.hpp modified: src/desktop/Workspace.cpp modified: src/events/Windows.cpp modified: src/managers/KeybindManager.cpp modified: src/managers/input/Swipe.cpp * fix mapWindow fullscreen modified: src/events/Windows.cpp * fix typo modified: src/desktop/Workspace.cpp * add fullscreenstate modified: src/config/ConfigManager.cpp modified: src/events/Windows.cpp * change syncFullscreen to lower modified: src/config/ConfigManager.hpp * initialize fs state modified: src/desktop/Window.hpp
* input: unify removing currentlyDraggedWindow (#7071)MightyPlaza2024-07-271-6/+7
| | | | | | | | modified: src/desktop/Window.cpp modified: src/events/Windows.cpp modified: src/layout/IHyprLayout.cpp modified: src/managers/KeybindManager.cpp modified: src/managers/KeybindManager.hpp modified: src/managers/input/InputManager.cpp
* layout: update workspace rules on layout change (#6878)MightyPlaza2024-07-153-0/+7
| | | | | modified: src/layout/DwindleLayout.cpp modified: src/layout/IHyprLayout.cpp modified: src/layout/MasterLayout.cpp
* core: Improve handling of window properties (#6776)MightyPlaza2024-07-113-20/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add mWindowProperties modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/events/Windows.cpp * support int values modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp * create m_sWindowData modified: src/Compositor.cpp modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/events/Windows.cpp modified: src/layout/DwindleLayout.cpp modified: src/layout/IHyprLayout.cpp modified: src/layout/MasterLayout.cpp modified: src/managers/AnimationManager.cpp modified: src/managers/KeybindManager.cpp modified: src/managers/XWaylandManager.cpp modified: src/render/OpenGL.cpp modified: src/render/Renderer.cpp modified: src/render/decorations/CHyprBorderDecoration.cpp modified: src/render/decorations/CHyprDropShadowDecoration.cpp modified: src/render/decorations/CHyprGroupBarDecoration.cpp * simplify some properties modified: src/Compositor.cpp modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/managers/KeybindManager.cpp * store multiple values in CWindowOverridableVar modified: src/Compositor.cpp modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/events/Windows.cpp modified: src/layout/IHyprLayout.cpp modified: src/managers/AnimationManager.cpp modified: src/managers/KeybindManager.cpp modified: src/managers/XWaylandManager.cpp modified: src/render/OpenGL.cpp modified: src/render/Renderer.cpp modified: src/render/decorations/CHyprBorderDecoration.cpp modified: src/render/decorations/CHyprDropShadowDecoration.cpp modified: src/render/decorations/CHyprGroupBarDecoration.cpp * clean up modified: src/Compositor.cpp modified: src/Compositor.hpp modified: src/config/ConfigManager.cpp modified: src/config/ConfigManager.hpp modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/events/Windows.cpp modified: src/layout/DwindleLayout.cpp modified: src/layout/IHyprLayout.cpp modified: src/layout/IHyprLayout.hpp modified: src/layout/MasterLayout.cpp modified: src/managers/KeybindManager.cpp * use SET_PROP priority for exec rules modified: src/config/ConfigManager.hpp modified: src/desktop/Window.cpp * add default value modified: src/Compositor.cpp modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/events/Windows.cpp modified: src/layout/IHyprLayout.cpp modified: src/managers/KeybindManager.cpp modified: src/managers/XWaylandManager.cpp modified: src/render/OpenGL.cpp modified: src/render/Renderer.cpp modified: src/render/decorations/CHyprBorderDecoration.cpp modified: src/render/decorations/CHyprDropShadowDecoration.cpp modified: src/render/decorations/CHyprGroupBarDecoration.cpp * add setprop toggle modified: src/config/ConfigManager.hpp modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.cpp * add setprop toggle modified: src/debug/HyprCtl.cpp * make window rules functional modified: src/config/ConfigManager.cpp modified: src/desktop/Window.cpp * minor fixes modified: src/Compositor.cpp modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.hpp * properly clean layout data modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/events/Windows.cpp modified: src/layout/DwindleLayout.cpp modified: src/layout/IHyprLayout.cpp modified: src/layout/IHyprLayout.hpp modified: src/layout/MasterLayout.cpp * remove newline modified: src/events/Windows.cpp * fixes modified: src/config/ConfigManager.hpp modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp * use CamelCase modified: src/Compositor.cpp modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/events/Windows.cpp modified: src/layout/IHyprLayout.cpp modified: src/managers/AnimationManager.cpp modified: src/managers/KeybindManager.cpp modified: src/managers/XWaylandManager.cpp modified: src/render/OpenGL.cpp modified: src/render/Renderer.cpp modified: src/render/decorations/CHyprBorderDecoration.cpp modified: src/render/decorations/CHyprDropShadowDecoration.cpp modified: src/render/decorations/CHyprGroupBarDecoration.cpp
* core: Move to hyprutils for MathVaxry2024-06-193-10/+10
| | | | | | Moves CRegion, CBox and Vector2D over to hyprutils. Requires hyprutils>=0.1.4
* master: refine master layout new window handling (#6479)memchr2024-06-151-13/+41
| | | | | | | | | | | | | | | | | | | | | * ## Open window relative to active window `new_on_active`: - `none` (default): - `before`: above of the focused window - `after`: below the focused window If the focused window is the solo master window, or the new window replaces master, this option has no effect and new_on_top are respected. ## Refine new window status control **BREAKING CHANGE**: new_is_master removed in favour of new variable `new_status`: - `slave` (default): new window open as slave - `master`: new window open as master - `inherit`: new window inherit status from active window, i.e. when the focused window is master, new window will become new master, otherwise new window are added to slaves * refactor: rename a few variables
* wayland/core: move to new impl (#6268)Vaxry2024-06-081-2/+3
| | | | | * wayland/core/dmabuf: move to new impl it's the final countdown
* layout: fix centering of new floating windowsvaxerski2024-06-031-1/+1
| | | | ref #6154
* xwayland: move to hyprland impl (#6086)Vaxry2024-05-251-4/+5
|
* layout: Fix shrinking pseudotile windows. (#6143)Gabriel Ford2024-05-181-1/+1
|
* xdg-shell: move to new implVaxry2024-05-141-3/+8
|
* internal: new shared_ptr and weak_ptr implementation (#5883)Vaxry2024-05-053-33/+33
| | | | | | | | | | | moves std::shared_ptrs to a new implementation Advantages: - you can dereference a weak_ptr directly. This will obviously segfault on a nullptr deref if it's expired. - this is useful to avoid the .lock() hell where we are 100% sure the pointer _should_ be valid. (and if it isn't, it should throw.) - weak_ptrs are still valid while the SP is being destroyed. - reasoning: while an object (e.g. CWindow) is being destroyed, its `weak_ptr self` should be accessible (the sp is still alive, and so is CWindow), but it's not because by stl it's already expired (to prevent resurrection) - this impl solves it differently. w_p is expired, but can still be dereferenced and used. Creating `s_p`s is not possible anymore, though. - this is useful in destructors and callbacks.
* layout: limit updates when mouse animate drag is enabled (#5838)thejch2024-05-021-1/+1
|
* internal: Window storage rework - part 1 (#5762)Vaxry2024-04-276-224/+224
| | | | | | | | | | | | | | | | | * Window storage rework - part 1 * format * remove useless include * fix pch * format * fix crash in dwindle * fix vram leak * prefer .expired() for bool checks
* keybindmgr: add optional `silent` suffix to `movewindow`. (#5597)Maarten de Vries2024-04-175-8/+21
| | | | | | With the `silent` suffix, the focus remains on the current position in the layout or the current monitor, instead of following the moved window. When combined with `movewindow mon:X`, this this allows you to get the same behavior as xmonad's `windowToScreen` command.
* master: change the mfact dispatcher to use splitratio (#4766)thejch2024-04-131-13/+1
| | | | | * master layout: change the mfact dispatcher to use splitratio * add space for concat
* master: fix full height when all windows master (#5549)Jan-Peter Dhallé2024-04-121-1/+1
|
* master: fix crash (#5472)thejch2024-04-071-1/+1
|
* master: fix workspace orientation not being restored after workspace rule no ↵thejch2024-04-062-37/+35
| | | | longer applies (#5463)
* workspacerules: fix workspace rule loops (#5433)thejch2024-04-052-48/+17
|
* layouts: add missing includeVaxry2024-04-042-0/+2
|
* master: fix swapped workspaces (#5397)thejch2024-04-031-1/+1
|
* master: fix center resizing (#5394)thejch2024-04-031-1/+1
|
* Workspace/core: Refactor workspace storage (#5380)Vaxry2024-04-025-103/+92
| | | | | * refactor workspaces to use ptrs * clang-format
* master: guard window in moveWindowToVaxry2024-04-021-0/+3
| | | | fixes #5374
* master: Make master workspace orientation rule dynamic (#5339)thejch2024-04-011-7/+26
| | | | | | | | | * make master workspace orientation rule dynamic * fix rebase * fix special ws resizing * style
* core: match all workspace rules instead of the first one only (#5340)thejch2024-03-312-17/+46
|