Commit graph

363 commits

Author SHA1 Message Date
Vaxry
6967a31450
wayland/core: move to new impl (#6268)
* wayland/core/dmabuf: move to new impl

it's the final countdown
2024-06-08 10:07:59 +02:00
Agent00Ming
d0a224a491
seat: discrete round away from zero + high res scrolling (#6317)
* Discrete scrolling round away from zero
e.deltaDiscrete can be multiples of 30 instead of the usual 120 causing
the rounded value to be 0 when too small causing erratic scrolling.

* Send value120 alongside discrete
Fixes sensitivity issues for clients that support value120 axis events
2024-06-03 22:47:02 +02:00
Vaxry
addd3e7f1a
xwayland: move to hyprland impl (#6086) 2024-05-25 22:43:51 +02:00
Can
ce17961aad
keybinds: Added new dispatcher (sendshortcut) (#6174) 2024-05-24 20:58:26 +02:00
Vaxry
f8857e6072 input: find surface pos correctly when mouse drag is active
fixes #6144
2024-05-18 21:20:01 +01:00
Vaxry
23cd4c7998 seat: update keymap/repeat info on keymap events from keebs
fixes #6114
2024-05-17 19:28:33 +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
Vaxry
7fbe05a250 inputmgr: send pointer motion on ffm != 1
fixes #6077
2024-05-15 16:22:45 +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
Sungyoon Cho
d0a4a0e0d8
input: fix modifier and leds (#6062) 2024-05-14 16:14:43 +01:00
Vaxry
b0861b6709 config: move various cursor-related vars to cursor: 2024-05-09 22:25:20 +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
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
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
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
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
8bcccf9f0f ime-v2: move to new impl 2024-05-01 16:41:17 +01:00
Vaxry
90e1411315 session-lock: move to new impl 2024-04-30 16:34:09 +01:00
Vaxry
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
Vaxry
f2b03e9679 ext-idle-notify: move to new impl 2024-04-29 17:50:07 +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
Vaxry
25aec3ac8c pointer-constraints: move to new impl 2024-04-27 03:17:04 +01:00
drendog
31d055f6d4
input: fix active keyboard for seat after destroying one (#5725)
* fix: manage active keyboard for seat after destroying one

* chore: clang-format
2024-04-23 23:30:35 +01:00
Vaxry
4954dcbbb3 relative-pointer: move to new impl 2024-04-21 19:30:23 +01:00
Vaxry
d9fe1d0f58 idle-inhibit: move to new impl 2024-04-21 16:54:52 +01:00
Vaxry
93e5d7ca5a input: check for focused_client being null before reading its client
ref #5673
2024-04-21 15:17:12 +01:00
Vaxry
30e4b404f2 cursor-shape: move to new impl 2024-04-21 01:49:23 +01:00
Vaxry
ccbdce7c85 input: send an empty relative event after constraint motion events
ref #4015
2024-04-15 17:22:25 +01:00
dranull
a06272ae55
input: Option for handling off-window axis events (#4177) 2024-04-08 23:35:21 +01:00
Junxuan Liao
d657b59f70
IME: fix IME popup mouse inputs (again) (#5417)
`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.
2024-04-07 15:15:50 +01:00
thejch
9f1604e4b0
input: Dont set active monitor when simulating mouse movement (#5465)
* fix mouse simulation switching focusedmon

* fix some warnings with wrong enum
2024-04-07 01:07:21 +01:00
Vaxry
ff114cf6f9 input: fix focus on maximized bg surfaces 2024-04-06 18:59:23 +01:00
Vaxry
f081a4300f input: fixup background layer checking on maximized 2024-04-06 15:18:58 +01:00
Vaxry
36a8ae9bda input: allow focus to bottom layers on maximized in reserved 2024-04-03 21:57:19 +01:00
Vaxry
ef23ef60c5
Workspace/core: Refactor workspace storage (#5380)
* refactor workspaces to use ptrs

* clang-format
2024-04-02 20:32:39 +01:00
Zach DeCook
1cc9a44318
input: Fix incorrect keyboard focus taken when no window was present (#5337)
A non-keyboard layer never needs keyboard focus
2024-03-31 00:50:25 +00:00
Vaxry
ae17e900e7 layer-shell: render popups above everything 2024-03-25 16:20:30 +00:00
dmayle
6b28bf563e
keybinds: Fix exit trigger by moving it to monitor.frame (#5240) 2024-03-25 01:46:59 +00:00
Vaxry
5cc4bf699c IME: Refactor and fixup popups 2024-03-24 16:08:25 +00:00
Khalid
059e85ae69
input: Add options to set tablet's active area (#5199)
* 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
2024-03-23 20:31:03 +00:00
Khalid
9ddf1b105e
tablet: Add left_handed option for tablets (#5178)
* Add left_handed option for tablets

* Update left_handed tablet option's fallback string
2024-03-20 04:00:43 +00:00