summaryrefslogtreecommitdiff
path: root/src/layout/IHyprLayout.cpp
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-211-4/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* layout: move applyGroupRules() to onWindowCreated() (#8139)Aqa-Ib2024-10-161-3/+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
|
* 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-021-13/+56
|
* window/xwayland: minor property cleanupVaxry2024-08-301-7/+7
| | | | fixes #6921
* misc: constify the remaining for loops (#7534)Tom Englund2024-08-261-3/+3
| | | 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.
* internal: refactor fullscreen states (#7104)MightyPlaza2024-07-311-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-151-0/+1
| | | | | 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-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-2/+2
| | | | | | Moves CRegion, CBox and Vector2D over to hyprutils. Requires hyprutils>=0.1.4
* 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-051-9/+9
| | | | | | | | | | | 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-271-53/+53
| | | | | | | | | | | | | | | | | * Window storage rework - part 1 * format * remove useless include * fix pch * format * fix crash in dwindle * fix vram leak * prefer .expired() for bool checks
* Workspace/core: Refactor workspace storage (#5380)Vaxry2024-04-021-11/+11
| | | | | * refactor workspaces to use ptrs * clang-format
* layout: improve initial size prediction for floatingVaxry2024-03-291-2/+55
|
* refactor: move window.hpp to desktop/Vaxry2024-03-201-0/+1
|
* input: Only limit drag resizes (#5164)phonetic1122024-03-191-1/+1
| | | | | | | * only limit drag resizes * change to not equals * remove extra parentheses
* animations: Fix incorrect animation when manually moving a window when its ↵thejch2024-03-191-0/+2
| | | | | | | being created (#5141) * fix incorrect rendering when manually moving a window when its being created * add setAnimationsToMove
* input: only override dragging corner on floating (#5092)djvs2024-03-131-1/+1
| | | Co-authored-by: djvs <djvs@users.noreply.github.com>
* input: add general:resize_corner for manual resizing (#5090)djvs2024-03-131-1/+21
| | | | | | | | | * Resize corner config thing * clang-format --------- Co-authored-by: djvs <djvs@users.noreply.github.com>
* layout: unfullscreen on toggle into tiled fullscreenVaxry2024-03-101-0/+5
| | | | fixes a bug where the tiled window would be on top
* windowrules: Make min/maxsize rules dynamic (#4775)Epilepsy Gatherings2024-03-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rebase * simplify and remove prop * Stuff - add back win prop - change minsize defaults - change request formatting for setprop * style fix * remove empty line * change defaults * redo string to vec * remove redundant parsing * change to vec * support commas * remove static rules * take out garbage * format * don't allow commas and resize on setprop * use isNumber
* input: fix window move stutter by introducing additional checks for low-hz ↵bvr-yr2024-03-061-5/+25
| | | | | | | | | | | monitors (#4553) * resize-limiter: add additional check for low-hz monitors * simplify checker * add comment * rename variable
* layout: warp the cursor when focusing windows (#4982)Junxuan Liao2024-03-051-0/+1
| | | | | Similar to the `focuswindow` dispatcher, when focusing a window with wlr-foreign-toplevel-management, the cursor should be warped. Otherwise, the focus is lost immediately after the cursor moves.
* config: improve config value infrastructureVaxry2024-03-031-12/+13
|
* drag: check min size for reisze dragsVaxry2024-03-021-1/+1
| | | | fixes #4920
* animations: Refactor AnimatedVariable (#4911)GartoxFR2024-03-021-23/+24
| | | | | | | | | | | | | | | | | | | | | | | * 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-0/+4
| | | | fixes #4022
* Migrate the config to hyprlang (#4656)Vaxry2024-02-181-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* internal: add `forcenofocus` prop (#4672)Epilepsy Gatherings2024-02-131-2/+2
| | | | | * add forcenofocus * change nofocus to overridable var
* input: focus window on mouse down on decoration (#4514)MightyPlaza2024-02-041-4/+5
| | | Also unifies vectorToWindow funcs
* input: remove animate checks on resize limiter (#4480)Epilepsy Gatherings2024-01-191-2/+1
|
* layout: Round window pos and size on togglefloating (#4407)Clyybber2024-01-101-6/+8
| | | Also restore the behaviour introduced in bc4a51dbbb285391c9ed45b1b6ca7c2037b7ba71
* groupbar: Middle click on groupbar to close tab (#4297)dranull2023-12-301-3/+3
| | | | | | | | | * Prevent window swapping when the head is removed * Bring floating windows to top when selected * Allow clicks on gropubar in fullscreen 1 * Close window on groupbar with middle click
* internal: Unify input handling on decorations (#4280)dranull2023-12-281-10/+2
| | | | | | | * Unify input handling on decorations * Make input methods private * Optional data