summaryrefslogtreecommitdiff
path: root/src/layout/IHyprLayout.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* layout: Focus a floating window after closing the last tiled (#4137)dranull2023-12-121-4/+10
|
* group: fix dragging into floating groups (#3719)MightyPlaza2023-11-191-1/+28
| | | | | | | | | | | * allow dragging into floating groups modified: src/Compositor.cpp modified: src/Compositor.hpp modified: src/layout/IHyprLayout.cpp modified: src/render/decorations/CHyprGroupBarDecoration.cpp * floating-only modified: src/layout/IHyprLayout.cpp
* layout: Don't update pseudoSize after window moved by mouse. (#3873)Dickby2023-11-181-1/+2
|
* xdg-shell: update reported size on ack_configureVaxry2023-11-091-1/+3
|
* layout: round box in mouseMoveVaxry2023-11-071-5/+7
| | | | fixes #3792
* layout: fix various rounding errorsVaxry2023-11-061-4/+7
| | | | maybe finally will end #3761
* events: set reported size on floating mapVaxry2023-11-051-1/+2
| | | | fixes #3767
* Internal: Hyprland box implementation (#3755)Vaxry2023-11-041-2/+2
| | | | | | | * box impl * remove unused operators * missed applyfromwlr
* input: handle mouse on decorations (#3560)MightyPlaza2023-10-291-0/+3
|
* layout: check for specialworkspace in floating togglevaxerski2023-09-241-1/+1
|
* keybinds: implement pushactivetobottom dispacher (#3217)alaricljs2023-09-211-3/+3
| | | Co-authored-by: Leeman <lstrout@enlj.com>
* logging: implement std::formatter for some types (#3380)memchr2023-09-201-1/+1
|
* logging/format: use std::format_string to catch formatting string errors at ↵memchr2023-09-201-1/+1
| | | | | | | compile time (#3377) * fix(log): use constexpr format string * deprecate getFormat
* layout: add direction parameter to onWindowCreated and friends (#3269)memchr2023-09-131-2/+2
| | | | | | | | | | | | | | | | | | * feat(layout): add direction parameter to onWindowCreated and friends In addition: - Implement directional moveWindowOutOfGroup for `movewindoworgroup` when using dwindle layout. (augmentation of #3006) - Replace `DWindleLayout::OneTimeFocus` with `IHyprLayout::eDirection`. - Slight formatting change (clang-format). * fix: nullptr dereference in dwindle window creation * refactor: generalized eDirection * refactor: eliminate DIRECTION_NONE * Update IHyprLayout.hpp
* layout: Allow the layout to control how windows are raised in groups (#3275)outfoxxed2023-09-121-1/+11
| | | | | | | | | | | | * Allow the layout to control how windows are raised in groups Previously windows could only be focused if they weren't hidden or were part of a group. This shifts the logic for picking the window out of a group to the layout allowing for alternate group implementations to function normally. * Fix doc comment consistency * Fix tabs in comments
* refactor: utilize 'middle()' method for window/montior center (#3253)memchr2023-09-111-3/+2
|
* internal: Remove all `.c_str()` calls when using `std::vformat` (#3198)Philip Damianik2023-09-061-1/+1
| | | Signed-off-by: pdamianik <39028343+pdamianik@users.noreply.github.com>
* internal: Formatter rework (#3186)Vaxry2023-09-061-2/+2
|
* refactor: replace manual iteration of CWindow with existing methods (#3147)memchr2023-09-041-13/+8
|
* layout: always center floating xdg windowsvaxerski2023-09-031-1/+1
|
* fix: use-after-free of CWindow* in CHyprGroupBarDecoration::draw (#3146)memchr2023-09-021-0/+1
|
* decos: groupbar mouse interaction (#3102)MightyPlaza2023-08-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * allow groupbar clicking modified: src/Window.cpp modified: src/Window.hpp modified: src/managers/input/InputManager.cpp modified: src/render/decorations/CHyprGroupBarDecoration.cpp modified: src/render/decorations/CHyprGroupBarDecoration.hpp * remove setting pos inside insertWindowToGroup() modified: src/Window.cpp modified: src/layout/DwindleLayout.cpp modified: src/layout/MasterLayout.cpp modified: src/managers/KeybindManager.cpp * add group window by index and group size functions modified: src/Window.cpp modified: src/Window.hpp modified: src/managers/input/InputManager.cpp * allow dragging into groupbar modified: src/Window.cpp modified: src/layout/DwindleLayout.cpp modified: src/layout/MasterLayout.cpp * allow dragging from groupbar modified: src/managers/KeybindManager.cpp * try groupbar clicking before border resize modified: src/managers/input/InputManager.cpp * block grabbing groupbar on floating (crash) remove later when crashing is fixed modified: src/managers/KeybindManager.cpp * remove redundant { } modified: src/layout/DwindleLayout.cpp modified: src/layout/MasterLayout.cpp * implement getWindowDecorationBox() modified: src/Window.cpp modified: src/Window.hpp modified: src/layout/DwindleLayout.cpp modified: src/layout/MasterLayout.cpp modified: src/managers/KeybindManager.cpp modified: src/managers/input/InputManager.cpp modified: src/render/decorations/CHyprDropShadowDecoration.cpp modified: src/render/decorations/CHyprGroupBarDecoration.cpp modified: src/render/decorations/IHyprWindowDecoration.cpp modified: src/render/decorations/IHyprWindowDecoration.hpp * fix crash when moveoutofgroup in floating windows also removes dragging from floating windows limitation modified: src/layout/IHyprLayout.cpp modified: src/managers/KeybindManager.cpp * use CRegion in getWindowDecorationBox() modified: src/helpers/Region.cpp modified: src/helpers/Region.hpp modified: src/layout/DwindleLayout.cpp modified: src/layout/MasterLayout.cpp modified: src/managers/KeybindManager.cpp modified: src/managers/input/InputManager.cpp modified: src/render/decorations/IHyprWindowDecoration.cpp modified: src/render/decorations/IHyprWindowDecoration.hpp * add groupbar scrolling modified: src/config/ConfigManager.cpp modified: src/managers/input/InputManager.cpp * change name to getWindowDecorationRegion() modified: src/layout/DwindleLayout.cpp modified: src/layout/MasterLayout.cpp modified: src/managers/KeybindManager.cpp modified: src/managers/input/InputManager.cpp modified: src/render/decorations/IHyprWindowDecoration.cpp modified: src/render/decorations/IHyprWindowDecoration.hpp * make dragging from group less hacky for floating modified: src/managers/KeybindManager.cpp
* layout: allow changing float status of fullscreen windowsvaxerski2023-08-281-5/+2
|
* layout: allow drag on fullscreen windowsvaxerski2023-08-281-3/+2
|
* layout: use full box for visibility check of floating xdgvaxerski2023-08-251-15/+5
| | | | Fixes #3069, if an xdg dialog pops up and is partially off bounds, just move it to the center.