Commit Graph

1207 Commits

Author SHA1 Message Date
Vaxry abbe71d26d pointer: don't update hw cursors on disabled displays 2024-05-16 19:34:36 +01:00
Agent00Ming 3ac0e7ead1
seat: Send discrete event when axis source is scroll wheel (#6103)
modified:   src/managers/SeatManager.cpp
	modified:   src/managers/input/InputManager.cpp

Co-authored-by: Agent_00Ming <agent00ming9366@gmail.com>
2024-05-16 13:30:55 +01:00
Gabriel Ford d693c44836
keybinds: add keybind combos and add Left and Right mod distinction. (#5966) 2024-05-16 11:48:30 +01:00
Vaxry 7e8c0b7f30 seat: send axis_stop events after axis events
fixes #6090
2024-05-15 23:13:51 +01:00
Vaxry b9c58b6e75 seat: send enter/leave events to all bound wl_seats for a client
fixes #6069

Will not send anything beyond enter/leave. If you depend on multiple seats sending you motion, button, etc, events, fix your app.
2024-05-15 19:33:42 +01:00
Vaxry 7fbe05a250 inputmgr: send pointer motion on ffm != 1
fixes #6077
2024-05-15 16:22:45 +01:00
Sungyoon Cho 31890026ea
wl_seat: send frame event after pointer leave (#6074) 2024-05-15 12:17:56 +01:00
Vaxry 94c20a1863 primary-selection: move to hyprland impl 2024-05-14 23:13:35 +01:00
Vaxry eed1361f39 wlr-data-device: move to hyprland impl 2024-05-14 23:13:35 +01:00
Vaxry 7eeee2c94e wl-data-device: move to hyprland impl 2024-05-14 23:13:35 +01:00
Vaxry fc72df8e58 seatmgr: Add a grab class 2024-05-14 23:13:33 +01:00
Vaxry 0cfdde3d1a xdg-shell: move to new impl 2024-05-14 23:02:24 +01:00
Vaxry 121d3a7213 wl_seat: move to hyprland impl 2024-05-14 23:02:24 +01:00
Vaxry 4cdddcfe46 cursor: minor fixes for unhiding surfaces
the surface equality check is done in CPointerManager, the one in renderer can be wrong

fixes #5975
2024-05-14 16:45:12 +01:00
Sungyoon Cho d0a4a0e0d8
input: fix modifier and leds (#6062) 2024-05-14 16:14:43 +01:00
Vaxry fd35b35000 keybinds: fix pass
reverts #5967

fixes #6022
2024-05-12 16:01:01 +01:00
Brenno Lemos 33a7b7bb6b
core: fix on-empty workspace being called too often (#6026) 2024-05-12 00:03:32 +01:00
shezdy 15072831cf
keybinds: fix release binds in submaps (#6025) 2024-05-12 00:02:26 +01:00
underengineering 37a84c5223
socket2: fix events being reordered (#5955)
* socket2: fix events being reordered

* remove WL_EVENT_READABLE

* initialize eventSource in SClient

* add more logs

oopsie

* replace unordered_map with vector

* fix reordering when socket becomes writable before queue is flushed

* ignore EAGAIN when accepting connection

* use g_pEventManager
2024-05-10 12:32:50 +01:00
Vaxry 3374229118 core: remove unused includes and fix warn 2024-05-10 03:20:26 +01:00
Vaxry a7e23d2f1e presentation-time: move to new impl 2024-05-10 02:38:54 +01:00
Vaxry 1753059b07 pointermgr: reset entered outputs when resetting surface
fixes #5970
2024-05-09 23:08:40 +01:00
Vaxry b0861b6709 config: move various cursor-related vars to cursor: 2024-05-09 22:25:20 +01:00
sub-kek 7cf810b181
keybinds: Fix classic global keybinds(pass dispatcher) (#5967) 2024-05-09 22:05:13 +01:00
Vaxry 635a02d83f layer-shell: move to new impl
Also bumps the hw-s dep
2024-05-09 22:02:18 +01:00
Vaxry fe4737fb9d pointer: don't calculate hw hotspot for missing hw cursors
ref #5964
2024-05-09 19:17:04 +01:00
Vaxry c98acaed62 virtual-keyboard: release keys before destroy 2024-05-09 14:07:21 +01:00
Vaxry 84e8d1810d Tablet: move to new impl
Ring and strip are not implemented. Will I implement this? God fucking knows. Nobody seems to have that anyways.
2024-05-09 13:37:39 +01:00
Vaxry ed411f53bd cursor: move to a hyprland impl
This moves wlr_cursor to a completely new impl mostly under
CPointerManager

Also adds beginSimple to OpenGL for simple render passes (e.g. cursor)
2024-05-09 13:37:39 +01:00
Ikalco 6a988d9276
core: cleanup environment on exit (#5941) 2024-05-08 18:11:08 +01:00
Vaxry 22a86fd7a2 session-lock: don't allow events from rejected locks
fixes #5913
2024-05-07 18:43:00 +01:00
Vaxry 2bcc8d303f eventloop: don't call lost timers 2024-05-07 13:30:41 +01:00
VPavliashvili 375e77e398
ipc: add togglegroup, moveintogroup and moveoutofgroup events (#5866) 2024-05-07 12:00:55 +01:00
Ikalco 57e76f91d9
keybinds: fix xkb keybind name to keysym comparison (#5917) 2024-05-07 07:20:06 +01:00
Ikalco cddeec47a1
keybinds: make the keybind manager check for session lock (#5894) 2024-05-05 19:28:14 +01:00
Vaxry 1ed1ce9506
internal: new shared_ptr and weak_ptr implementation (#5883)
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.
2024-05-05 17:16:00 +01:00
Sungyoon Cho 03ebad3cbf
idle-inhibit: enable idle inhibitor if no hl surface is associated (#5882) 2024-05-05 14:04:40 +01:00
outfoxxed aaf35b9f1f
protocols: add hyprland_focus_grab_v1 implementation (#5850)
* protocols: add hyprland_focus_grab_v1 implementation

* protocols/focus_grab: fix keyboard focus staying on unlisted windows

When creating a focus grab with layershell surfaces, the last active
toplevel kept keyboard focus.

* protocols/focus_grab: fix formatting

* protocols/focus_grab: try to pick surface for keyboard focus

* focus_grab: update keyboard focus to match spec

* Revert "protocols/focus_grab: try to pick surface for keyboard focus"

This reverts commit 090358d0d1.

* protocols/focus_grab: fix issues and match new spec

* kde-server-decoration: move to new impl

* protocols/focus_grab: review fixup

* Update hyprland-protocols

---------

Co-authored-by: Vaxry <vaxry@vaxry.net>
2024-05-05 03:14:35 +01:00
Vaxry 62eadad20f kde-server-decoration: move to new impl 2024-05-05 02:00:55 +01:00
Vaxry 0b215c5f24 idle-inhibit: fix and cleanup visibility logic
fixes #5878
2024-05-04 23:46:10 +01:00
Vaxry a3b4923c42 input: ignore destroyed devices in static events
fixes #5863
2024-05-04 00:48:25 +01:00
Vaxry 1237732b97 input: Introduce basic hyprland HID classes
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.
2024-05-03 22:40:27 +01:00
Tom Englund 1c73beaf9b
inputmgr: dont double free on hotplug (#5855)
* 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.
2024-05-03 18:10:41 +01:00
Vaxry 8a2269272b output-management: move to new impl 2024-05-03 18:08:04 +01:00
Tom Englund d5bf15387a
internal: fix a few asan reported leaks on exit of hyprland (#5852)
* notifications: free cairo images on destruction

asan reports a leak on exit if we dont free the image we created in the
draw function. add a destructor and free images on exit.

* compositor: destroy wlroots types on exit

there are a few types not being destroyed on exit and causing a leak on
exit in wlroots reported by asan, add those.

* cursormgr: ensure we destroy cursor mgr on exit

add a destructor and call wlr_xcursor_manager_destroy on the manager on
destruction, leak reported by asan.

* keybindmgr: free state and keymap

add missing keymap_unref on creation, and add a destructor and free the
state on exit. leak reported by asan.

* skeyboard: add destructor and free state

free the state on destruction of keyboard, reported as leak by asan
2024-05-03 14:42:08 +01:00
Vaxry 2755297670 virtual-pointer: move to new impl 2024-05-03 01:52:05 +01:00
Vaxry 7d49819b5e virtual-keyboard: destroy on vdestroy event 2024-05-03 00:54:32 +01:00
Vaxry 6aa2d123ae virtual-keyboard: move to new impl 2024-05-03 00:31:48 +01:00
Vaxry a3ca016d42 cursor-shape: use - instead of _ in shapes
ref #5824
2024-05-02 16:21:33 +01:00
Vaxry 8427824719 cursormgr: attempt using - instead of _ for failed cursors before fallback
web uses -, and thus some themes might use - too. Attempt replacing _ with - before assuming a shape is missing.
2024-05-02 14:47:10 +01:00