summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* config: move various cursor-related vars to cursor:Vaxry2024-05-091-1/+1
|
* layer-shell: move to new implVaxry2024-05-091-2/+3
| | | | Also bumps the hw-s dep
* virtual-keyboard: release keys before destroyVaxry2024-05-091-0/+2
|
* Tablet: move to new implVaxry2024-05-091-45/+86
| | | | Ring and strip are not implemented. Will I implement this? God fucking knows. Nobody seems to have that anyways.
* cursor: move to a hyprland implVaxry2024-05-091-44/+46
| | | | | | | This moves wlr_cursor to a completely new impl mostly under CPointerManager Also adds beginSimple to OpenGL for simple render passes (e.g. cursor)
* internal: new shared_ptr and weak_ptr implementation (#5883)Vaxry2024-05-051-11/+10
| | | | | | | | | | | 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.
* input: ignore destroyed devices in static eventsVaxry2024-05-041-0/+12
| | | | fixes #5863
* input: Introduce basic hyprland HID classesVaxry2024-05-031-259/+186
| | | | | | Implements an intermediary HID class for mice, keyboards and touch devices, removing the old structs from WLClasses.hpp Yes, virtual ones are duplicated a bit, but will likely be de-duped once wlr_input_device is not used anymore.
* inputmgr: dont double free on hotplug (#5855)Tom Englund2024-05-031-0/+1
| | | | | | | | | | | | | | * inputmgr: dont double free on hotplug since we are also unrefing the state on hotplugging the keyboard set the state to nullptr so the destructor if case actually catches its been already freed. * keybindgmgr: dont double free on layout switching d5bf153 added keymap unref at the end of updateXKBTranslationState to not leak it when exiting, only it causes updateXKBTranslationState to double free when changing layouts. since its already freed. remove the unneeded extra xkb_keymap_unref.
* virtual-pointer: move to new implVaxry2024-05-031-2/+34
|
* virtual-keyboard: destroy on vdestroy eventVaxry2024-05-031-0/+3
|
* virtual-keyboard: move to new implVaxry2024-05-031-13/+19
|
* ime-v2: move to new implVaxry2024-05-011-12/+15
|
* session-lock: move to new implVaxry2024-04-301-1/+2
|
* layerSurface: refactor/move to a memory-safe implVaxry2024-04-301-6/+6
| | | | | Makes all the pointers smart to avoid memory issues Refactors layerSurface code to live inside desktop/layersurface
* ext-idle-notify: move to new implVaxry2024-04-291-4/+5
|
* internal: Window storage rework - part 1 (#5762)Vaxry2024-04-271-24/+25
| | | | | | | | | | | | | | | | | * Window storage rework - part 1 * format * remove useless include * fix pch * format * fix crash in dwindle * fix vram leak * prefer .expired() for bool checks
* pointer-constraints: move to new implVaxry2024-04-271-4/+15
|
* input: fix active keyboard for seat after destroying one (#5725)drendog2024-04-231-10/+9
| | | | | * fix: manage active keyboard for seat after destroying one * chore: clang-format
* relative-pointer: move to new implVaxry2024-04-211-5/+4
|
* idle-inhibit: move to new implVaxry2024-04-211-1/+4
|
* input: check for focused_client being null before reading its clientVaxry2024-04-211-0/+3
| | | | ref #5673
* cursor-shape: move to new implVaxry2024-04-211-17/+23
|
* input: send an empty relative event after constraint motion eventsVaxry2024-04-151-0/+1
| | | | ref #4015
* input: Option for handling off-window axis events (#4177)dranull2024-04-081-0/+19
|
* IME: fix IME popup mouse inputs (again) (#5417)Junxuan Liao2024-04-071-17/+17
| | | | | | | | `lastBoxLocal`'s size should be the actual popup's size instead of the cursor rectangle's size. Also, the rectangle position is now relative to the popup. (Actually fixes #5255 imho.) One thing #3922 missed was handling focus held by buttons. Let's hope I get it right this time.
* input: Dont set active monitor when simulating mouse movement (#5465)thejch2024-04-071-5/+5
| | | | | * fix mouse simulation switching focusedmon * fix some warnings with wrong enum
* input: fix focus on maximized bg surfacesVaxry2024-04-061-3/+5
|
* input: fixup background layer checking on maximizedVaxry2024-04-061-7/+6
|
* input: allow focus to bottom layers on maximized in reservedVaxry2024-04-031-9/+18
|
* Workspace/core: Refactor workspace storage (#5380)Vaxry2024-04-021-4/+4
| | | | | * refactor workspaces to use ptrs * clang-format
* input: Fix incorrect keyboard focus taken when no window was present (#5337)Zach DeCook2024-03-311-4/+2
| | | A non-keyboard layer never needs keyboard focus
* layer-shell: render popups above everythingVaxry2024-03-251-0/+3
|
* keybinds: Fix exit trigger by moving it to monitor.frame (#5240)dmayle2024-03-251-3/+0
|
* IME: Refactor and fixup popupsVaxry2024-03-241-3/+3
|
* input: Add options to set tablet's active area (#5199)Khalid2024-03-231-0/+7
| | | | | | | | | * Add options to set tablet's active area * Set tablet's active area in `setTabletConfigs` * Fix formatting for new variables in ConfigManager * Report tablet's physical size with hyprctl
* tablet: Add left_handed option for tablets (#5178)Khalid2024-03-201-0/+5
| | | | | * Add left_handed option for tablets * Update left_handed tablet option's fallback string
* refactor: move window.hpp to desktop/Vaxry2024-03-201-0/+1
|
* input: fix minor default cursor reset conditionsVaxry2024-03-091-0/+2
|
* deps: update wlrootsVaxry2024-03-091-6/+6
|
* input: scale local coords in constraintsVaxry2024-03-081-1/+1
| | | | fixes #5029
* config: Add input:scroll_factor configuration (#4980)Grant Ammons2024-03-051-2/+3
| | | | | | | | | | * Allow for input:scroll_factor configuration This PR will allow for a `scroll_factor` configuration within an `input` block. The purpose is to control the scroll factor of external mice. Closes #2574. * clang-format
* input: send motion to confined cursorsVaxry2024-03-041-0/+1
|
* config: improve config value infrastructureVaxry2024-03-031-47/+48
|
* input: Rewritten pointer constraints (#4889)Vaxry2024-03-021-176/+32
| | | | | | | | | | | | | | | | | * rewritten constraints * send pointer enter on activate if not pointer focus * minor cleanup * simulate movement on commit * don't ignore oneshot prop * various fixes * dont send motion on confined * update pos hint on region change
* keybinds: better follow xkb translation stateVaxry2024-03-021-3/+4
| | | | fixes #4908
* 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
* config: Add option to resolve keybinds by sym instead of code (#4851)Tobias Zimmermann2024-02-271-2/+9
| | | | | | | | | | | | | | This commit adds the new configuration option 'resolve_binds_by_sym' which can be set globally or per-device. It is off by default, which preserves the current behavior. This setting only affects the behavior of keybinds that are defined via key symbols, not those defined via keycode. Binds defined by symbols currently activate if the keycode pressed would generate the specified symbol on the first layout specified in the input section. If enabled, keys pressed on the relevant device will instead match keybinds by the symbols they produce with their current layout. Closes #1881.
* input: Map touch devices and tablets bound to an output (#3544)Philip Damianik2024-02-271-6/+22
| | | | | | | | | | | * Map bound touch devices and tablets to an output * Add "[[Auto]]" default option for auto detecting outputs for touch inputs * Bind new monitors to configured touch and tablet devices * Use Monitor::matchesStaticSelector in CConfigManager::getMonitorRuleFor * Use Monitor::matchesStaticSelector in CCompositor::getMonitorFromString
* Migrate the config to hyprlang (#4656)Vaxry2024-02-181-44/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>