Commit graph

1188 commits

Author SHA1 Message Date
3374229118 core: remove unused includes and fix warn 2024-05-10 03:20:26 +01:00
a7e23d2f1e presentation-time: move to new impl 2024-05-10 02:38:54 +01:00
1753059b07 pointermgr: reset entered outputs when resetting surface
fixes #5970
2024-05-09 23:08:40 +01:00
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
635a02d83f layer-shell: move to new impl
Also bumps the hw-s dep
2024-05-09 22:02:18 +01:00
fe4737fb9d pointer: don't calculate hw hotspot for missing hw cursors
ref #5964
2024-05-09 19:17:04 +01:00
c98acaed62 virtual-keyboard: release keys before destroy 2024-05-09 14:07:21 +01:00
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
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
22a86fd7a2 session-lock: don't allow events from rejected locks
fixes #5913
2024-05-07 18:43:00 +01:00
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
62eadad20f kde-server-decoration: move to new impl 2024-05-05 02:00:55 +01:00
0b215c5f24 idle-inhibit: fix and cleanup visibility logic
fixes #5878
2024-05-04 23:46:10 +01:00
a3b4923c42 input: ignore destroyed devices in static events
fixes #5863
2024-05-04 00:48:25 +01:00
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
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
2755297670 virtual-pointer: move to new impl 2024-05-03 01:52:05 +01:00
7d49819b5e virtual-keyboard: destroy on vdestroy event 2024-05-03 00:54:32 +01:00
6aa2d123ae virtual-keyboard: move to new impl 2024-05-03 00:31:48 +01:00
a3ca016d42 cursor-shape: use - instead of _ in shapes
ref #5824
2024-05-02 16:21:33 +01:00
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
8bcccf9f0f ime-v2: move to new impl 2024-05-01 16:41:17 +01:00
1f6657f037 keybinds: check for special workspace equality before switching
fixes #5814
2024-04-30 16:42:31 +01:00
90e1411315 session-lock: move to new impl 2024-04-30 16:34:09 +01:00
5edc32930d layerSurface: refactor/move to a memory-safe impl
Makes all the pointers smart to avoid memory issues
Refactors layerSurface code to live inside desktop/layersurface
2024-04-30 02:41:27 +01:00
f2b03e9679 ext-idle-notify: move to new impl 2024-04-29 17:50:07 +01:00
86133983a9 xdg-activation: move to new impl 2024-04-29 16:43:24 +01:00
33e0bb1478 wlr-output-power: move to new impl 2024-04-29 01:38:24 +01:00
Vaxry
a5a6480917
core: Move /tmp/hypr to $XDG_RUNTIME_DIR/hypr (#5788)
Moves the directory containing sockets and logs.
Also restructures lockfiles a bit.

For consumers, check if `$XDG_RUNTIME_DIR/hypr` exists. If so, use it. If not, use the old `/tmp/hypr`.
2024-04-28 22:25:24 +01:00
82a6fba6ec tokenmgr: separate getRandomUUID from registerNewToken 2024-04-28 18:17:48 +01:00
Vaxry
bca7804bb6
internal: Window storage rework - part 1 (#5762)
* Window storage rework - part 1

* format

* remove useless include

* fix pch

* format

* fix crash in dwindle

* fix vram leak

* prefer .expired() for bool checks
2024-04-27 12:43:12 +01:00
25aec3ac8c pointer-constraints: move to new impl 2024-04-27 03:17:04 +01:00
f94264928a swipe: fix crashes with invalid distance
fixes #5758
2024-04-26 19:11:28 +01:00
1d40af64d3 text-input-v3: move to new impl 2024-04-25 23:27:44 +01:00
01df3b73d8 shortcuts-inhibitor: move to new impl 2024-04-25 14:32:35 +01:00
ecf282d331 wlr-foreign-toplevel: move to new impl 2024-04-25 01:10:43 +01:00
zakk4223
72e31d3335
idle-inhibit: Always recheck idle inhibitors on creation and deletion (#5738)
Formatting
2024-04-25 00:05:19 +01:00
3878f806ff pointer-gestures: move to new impl 2024-04-24 21:36:56 +01:00
8aecd4f253 cursormgr: fix misscaled cursors on fractional 2024-04-24 16:18:38 +01:00
608eff600d tokens: add more modes to initial_workspace_tracking
1 is single-shot, 2 is persistent

fixes #5732
2024-04-24 16:16:52 +01:00