summaryrefslogtreecommitdiff
path: root/src/layout/DwindleLayout.cpp
Commit message (Collapse)AuthorAgeFilesLines
* core: cleanup header includes (#9088)user1111111111111111111111111111111112025-01-171-0/+4
| | | Cleanup some unneeded includes to speed up compilation
* core: move parts of the animation system to hyprutils (#8868)Maximilian Seidler2025-01-071-19/+19
| | | | | | | | | | | | | * core: change animation manager to use Hyprutils::Animation * config: move animation config to hyprutils animation tree * use g_pAnimationManager->createAnimation and the new PHLANIMVAR template * core: use CGenericAnimatedVariabled::{enabled,setConfig,getStyle} and adapt callbacks * core: adapt animated variable usage (dereference the shared pointer) * misc: bump CMakeLists to hyprutils 0.3.3
* internal: remove dead code (#8748)Ikalco2024-12-171-17/+0
|
* core: drop using deques in favor of vectorsVaxry2024-12-161-13/+11
| | | | No point in most of these.
* core: Add clang-tidy (#8664)Vaxry2024-12-071-4/+4
| | | | | This adds a .clang-tidy file for us. It's not a strict requirement to be compliant, but I tuned it to be alright.
* core: workspace-related function cleanup / refactorVaxry2024-11-221-3/+3
| | | | CCompositor is massive, and has a lot of functions that could be better optimized if in CWorkspace
* windows/xdg: minor cleanup of min/max size calculationsVaxry2024-11-171-1/+1
| | | | fixes #8495
* groups: add merge_groups_on_groupbar (#8362)Aqa-Ib2024-11-061-5/+0
|
* internal: check size limit in layouts (#8298)MightyPlaza2024-10-301-1/+3
| | | | | | | | | | | modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/events/Windows.cpp modified: src/helpers/MiscFunctions.cpp modified: src/helpers/MiscFunctions.hpp modified: src/layout/DwindleLayout.cpp modified: src/layout/IHyprLayout.cpp modified: src/layout/MasterLayout.cpp modified: src/macros.hpp
* core: move internal structures to monitor pointers (#8266)Vaxry2024-10-271-9/+9
|
* internal: Move CMonitor to SP (#8178)Vaxry2024-10-191-4/+3
| | | | | * move monitors to sp * XD
* layout: move applyGroupRules() to onWindowCreated() (#8139)Aqa-Ib2024-10-161-4/+0
|
* config/layout: nuke no_gaps_when_only (#8072)Vaxry2024-10-111-26/+4
|
* layout: add auto_group to control default grouping (#7883)Aqa-Ib2024-10-021-20/+1
|
* dwindle: add movetoroot method to layout messages (#7903)Luke Chen2024-09-291-0/+42
|
* 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
* misc: constify the remaining for loops (#7534)Tom Englund2024-08-261-2/+2
| | | now we roll loops at blazing constified speed.
* core: make most for loops use const references (#7527)Tom Englund2024-08-261-1/+1
| | | | why not let the compiler optimise things for us at hyprspeeds when we can.
* decorations: fix manual resize not recalculating decos (#7323)MightyPlaza2024-08-131-0/+2
| | | | 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-081-6/+6
| | | | | | | | | | | | | | | | | | | | 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-031-3/+2
| | | | | 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-311-56/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* layout: update workspace rules on layout change (#6878)MightyPlaza2024-07-151-0/+3
| | | | | modified: src/layout/DwindleLayout.cpp modified: src/layout/IHyprLayout.cpp modified: src/layout/MasterLayout.cpp
* core: Improve handling of window properties (#6776)MightyPlaza2024-07-111-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-191-6/+6
| | | | | | Moves CRegion, CBox and Vector2D over to hyprutils. Requires hyprutils>=0.1.4
* internal: new shared_ptr and weak_ptr implementation (#5883)Vaxry2024-05-051-12/+12
| | | | | | | | | | | 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.
* internal: Window storage rework - part 1 (#5762)Vaxry2024-04-271-45/+45
| | | | | | | | | | | | | | | | | * 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-171-2/+11
| | | | | | 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.
* workspacerules: fix workspace rule loops (#5433)thejch2024-04-051-20/+6
|
* Workspace/core: Refactor workspace storage (#5380)Vaxry2024-04-021-29/+24
| | | | | * refactor workspaces to use ptrs * clang-format
* core: match all workspace rules instead of the first one only (#5340)thejch2024-03-311-6/+19
|
* layout: improve initial size prediction for floatingVaxry2024-03-291-1/+1
|
* animations: Fix incorrect animation when manually moving a window when its ↵thejch2024-03-191-0/+5
| | | | | | | being created (#5141) * fix incorrect rendering when manually moving a window when its being created * add setAnimationsToMove
* master: fix moving fullscreen workspace and remove duplicate code (#5131)thejch2024-03-171-33/+16
|
* dwindle: preserve fs state on switchWindowsVaxry2024-03-101-4/+15
| | | | fixes #2842
* layout: Fix toggling fullscreen special workspace on different monitor (#5000)thejch2024-03-071-0/+21
| | | | | | | * fix toggling fullscreen special ws on different monitor * add for dwindle * fix change regular workspace when special fullscreen
* keybinds: Allow fullscreen/maximize in special workspace (#4921)thejch2024-03-041-3/+4
| | | | | | | | | | | | | | | * allow fullscreen/maximize in special workspace * remove duplicate code * hide top layer * fix special fullscreen deco * edit * fix fade top layer when toggle special * remove double render
* config: improve config value infrastructureVaxry2024-03-031-62/+61
|
* xdg: minor improvements to initial size reportingVaxry2024-03-021-5/+2
| | | | fixes #4918
* animations: Refactor AnimatedVariable (#4911)GartoxFR2024-03-021-8/+8
| | | | | | | | | | | | | | | | | | | | | | | * animation: Refactor AnimatedVariable This commit decomposes the AnimatedVariable class into a base class with the common attribute to all variable types and a templated derived type containing strongly typed info on the type being animated. Access to the typed version is perfomed using the visitor pattern. A utility is provided to build a visitor on the fly using lambdas. Adding a new type to be animated should just be a matter of adding the typed in the list defined by the ANIMABLE_TYPES macro The size of the commit is justified by the API change in the AnimatedVariable class. No more vec(), fl() or col() method but a unified value() method. * animation: Remove visitor pattern * animation: Fix coding style * animation: Fix coding style
* layout: add size prediction for initial xdg commitsvaxerski2024-02-281-8/+58
| | | | fixes #4022
* feat: Add css style gaps (#4723)Dashie2024-02-211-6/+8
|
* Migrate the config to hyprlang (#4656)Vaxry2024-02-181-50/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Migrate to hyprlang * pop up errors * fix swapped args * Meson & Nix: build with hyprlang * CI: add hyprlang to setup action * add infra for plugin stuff * fix hyprctl getoption * fix hyprctl getoption with json * format * fix post parse logic * fix autogen config * oops missed exec-once * fmt * fix ws rules * require 0.3.0 for hyprlang * nix: flaek * minor type fixes * fix cfg usages in swipe * use cvarlist for ws rules * fix throw in addPluginConfigVar * Nix: update hyprlang * minor fixes * fix disableLogs * mention hyprlang docs * bump hyprlang dep in cmake * Meson: bump min hyprlang version Nix: update hyprlang * minor fix * Nix: update meson patch --------- Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
* dwindle: add swapsplit dispatcher (#4702)Niklas Haas2024-02-141-0/+16
| | | | | | This is distinct from `swapwindow` in that it allows swapping the entire tree node with its neighbour. Fixes: https://github.com/hyprwm/Hyprland/issues/4701
* dwindle: round wbox before settingvaxerski2024-02-141-5/+10
|
* input: focus window on mouse down on decoration (#4514)MightyPlaza2024-02-041-2/+2
| | | Also unifies vectorToWindow funcs
* dwindle: avoid sending negative sizes to wlrVaxry2024-02-021-4/+4
| | | | fixes #4591
* dwindle: fix windows being created at incorrect position when cursor is over ↵rszyma2024-01-261-31/+52
| | | | | | | | | | | reserved area (#4520) * fix: smart_split not working correctly when creating a window with cursor over reserved area * use getClosestNodeOnWorkspace instead of getFirstNodeOnWorkspace when hovering over reserved area * optimize `getClosestNodeOnWorkspace` * remove unused methods
* layout: save float props before setting fs state (#4537)bvr-yr2024-01-261-8/+8
| | | fixes #4388