summaryrefslogtreecommitdiff
path: root/src/managers/input/Swipe.cpp
Commit message (Collapse)AuthorAgeFilesLines
* core: cleanup header includes (#9088)user1111111111111111111111111111111112025-01-171-0/+3
| | | Cleanup some unneeded includes to speed up compilation
* core: move parts of the animation system to hyprutils (#8868)Maximilian Seidler2025-01-071-61/+61
| | | | | | | | | | | | | * 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
* core: workspace-related function cleanup / refactorVaxry2024-11-221-7/+6
| | | | CCompositor is massive, and has a lot of functions that could be better optimized if in CWorkspace
* core: move internal structures to monitor pointers (#8266)Vaxry2024-10-271-2/+1
|
* internal: Move CMonitor to SP (#8178)Vaxry2024-10-191-5/+5
| | | | | * move monitors to sp * XD
* core: make most for loops use const references (#7527)Tom Englund2024-08-261-3/+3
| | | | why not let the compiler optimise things for us at hyprspeeds when we can.
* internal: introduce new types to avoid unsigned int rollover and signed int ↵Tom Englund2024-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | 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
* internal: refactor fullscreen states (#7104)MightyPlaza2024-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* core: add ability to select previous workspace per monitor (#6598)Alexander2024-06-221-7/+5
| | | Co-authored-by: Крылов Александр <aleksandr.krylov@hyperus.team>
* core: Move to hyprutils for MathVaxry2024-06-191-20/+20
| | | | | | Moves CRegion, CBox and Vector2D over to hyprutils. Requires hyprutils>=0.1.4
* gestures: Add gestures:workspace_swipe_min_fingers option (#6342)John M. Harris, Jr2024-06-071-4/+5
| | | | | | | | | | When gestures:workspace_swipe_min_fingers is enabled, gestures:workspace_swipe_fingers is considered to be the minimum number of fingers required to swipe. This behavior is more similar to sway and macOS's default behavior. For example, this allows you to set workspace_swipe_fingers to 3, but swipe with 4 or more fingers instead of 3.
* layer-shell: move to new implVaxry2024-05-091-2/+2
| | | | Also bumps the hw-s dep
* cursor: move to a hyprland implVaxry2024-05-091-7/+7
| | | | | | | This moves wlr_cursor to a completely new impl mostly under CPointerManager Also adds beginSimple to OpenGL for simple render passes (e.g. cursor)
* swipe: fix crashes with invalid distanceVaxry2024-04-261-18/+20
| | | | fixes #5758
* swipe: nuke numberedVaxry2024-04-111-8/+6
| | | | | | fixes #5424 use_r instead
* swipe: add eventsVaxry2024-04-031-0/+6
|
* Workspace/core: Refactor workspace storage (#5380)Vaxry2024-04-021-7/+7
| | | | | * refactor workspaces to use ptrs * clang-format
* swipe: fix nullptr in `onSwipeUpdate` (#5191)Horror Proton2024-03-201-2/+2
|
* swipe: Touchscreen workspace swipe (#4489)Zach DeCook2024-03-171-4/+14
| | | | | | | | | * Workspace Swipe: Refactor update and end functions * Touch: Implement workspace swipe better ignoring additional fingers and new touches allow gaps-right and gaps-left to be different
* config: improve config value infrastructureVaxry2024-03-031-56/+57
|
* animations: Refactor AnimatedVariable (#4911)GartoxFR2024-03-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | * 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
* Migrate the config to hyprlang (#4656)Vaxry2024-02-181-58/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* swipe: Prevent hiding current workspace when swiping (#4417)scorpion-262024-01-111-2/+2
| | | | | | | When workspace_swipe_use_r is enabled, swiping from WS 1 to a non-empty WS 2 would hide WS 1 (Similar effect to issue #4076). This is caused by a faulty check which doesn't consider, that workspaceIDLeft could be the current workspace. This bug is only a problem for r, because m wraps around on WS 1 m-1, whereas r stays on WS 1.
* style/ci: apply clang-format and verify it in ci (#4039)François Conzelmann2023-12-061-32/+20
| | | | | * style: apply clang-format * ci: add new clang-format job to CI
* general: add workspace gaps (#3877)end-42023-11-191-35/+50
| | | | | | | | | | | | | | | | | | | | | * anims: workspace gap * anims: ws gaps: on swipe end * anims: ws gaps: add missing parentheses * format * refractor * Update Swipe.cpp * format * fix swipe to right * ws gaps: move animations:workspace_gap to general:gaps_workspace * ws gaps: general:gaps_workspace -> general:gaps_workspaces
* internal: replace INT_MAX with WORKSPACE_INVALIDVaxry2023-11-121-1/+1
|
* cleanup: Replace find() with C++20 starts_with(), ends_with() and contains() ↵Philip Damianik2023-10-151-2/+2
| | | | | | | (#3572) * Replace find() with C++20 starts_with() and ends_with() * Replace find() with C++20 contains()
* fix: inconsistent behaviour where last workspace was not saved (#3261)memchr2023-09-111-0/+1
|
* 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-1/+1
|
* gestures: Swipe direction lock (#3052)end-42023-08-231-8/+18
|
* animations: add slidefade and slidefadevert styles for workspaces (#3008)end-42023-08-171-2/+4
| | | | | | | | | | | | | | | * add slidefade and slidefadevert animations * fix swiping for slidefadevert * rename minPerc to movePerc for slidefade anim styles * change default slidefade percentage to 100% * remove useless comments * findlastof + 1 * debug logging for slidefade/slidefadevert percentage
* swipe: fix mixup of r/mvaxerski2023-07-041-2/+2
|
* gestures: add workspace_swipe_use_rvaxerski2023-07-011-4/+6
|
* internal: workspace manip handling reworkvaxerski2023-04-141-4/+4
|
* Fix swiping onto a new workspace with multiple monitors. (#1971)Andrew Pritchard2023-04-071-4/+16
| | | | | | | | | | | | | | | | | | | | | The previous code could run into issues into the following circumstances: * The focused monitor is on its rightmost workspace with ID `i`. * Another monitor has a workspace with ID `i+1`. * `workspace_swipe_create_new` is enabled. Then, swiping rightwards attempts to target a new workspace with ID `i+1`: completing the swipe gesture unintentionally focuses that workspace on whichever monitor it's already on while leaving the active monitor in a broken state where it shows no windows but creates new windows on the workspace it was previously on; and cancelling the swipe gesture shifts the entire workspace `i+1` to the right by the width of the active monitor. By choosing an ID that doesn't exist, this problematic behavior is avoided. More specifically, it's the smallest ID greater than any existing workspace's ID, because otherwise the new workspace that was seemingly just created to the right of the rightmost workspace could end up somewhere in the middle of the workspace order.
* swipe: block on locked sessionvaxerski2023-04-071-1/+1
|
* remove old comment and fixup lsl var namevaxerski2023-01-221-2/+2
|
* Normalize color storagevaxerski2023-01-051-8/+8
| | | | | | Colors are now normalized to 0 - 1 values instead of 0 - 255 causes calculations to be simpler and generally cleans up the codebase.
* added workspace_swipe_numberedvaxerski2022-12-251-34/+59
|
* Added clang format (#1239)Vaxry2022-12-161-37/+44
| | | * clang-format stuff and format files
* Added handling more special workspacesvaxerski2022-11-271-1/+1
|
* Fix swiping on the first workspace going to the last (#1067)CactiChameleon92022-11-211-1/+4
|
* added workspace_swipe_forevervaxerski2022-11-031-0/+12
|
* fix swipe on 2 detached workspacesvaxerski2022-11-021-1/+1
|
* fix swipe with fullscreen maximizedvaxerski2022-10-201-1/+1
|
* minor swipe on new fixesvaxerski2022-10-201-0/+4
|
* minor fix for swipes from empty workspacesvaxerski2022-10-201-1/+1
|
* fix minor anim issue with swipe newvaxerski2022-10-201-1/+8
|
* added swipe create newvaxerski2022-10-201-10/+30
|