mirror of
https://github.com/hyprwm/Hyprland
synced 2026-05-05 06:58:08 +02:00
Restore m_isTouchpad property
This commit is contained in:
parent
3cbe6d3bd5
commit
d5eba72cad
3 changed files with 7 additions and 0 deletions
1
hyprtester/pointer-scroll.txt
Normal file
1
hyprtester/pointer-scroll.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
Failed to connect to wayland display
|
||||
|
|
@ -112,6 +112,7 @@ class IPointer : public IHID {
|
|||
std::string m_boundOutput = "";
|
||||
bool m_flipX = false; // decide to invert horizontal movement
|
||||
bool m_flipY = false; // decide to invert vertical movement
|
||||
bool m_isTouchpad = false;
|
||||
std::optional<float> m_scrollFactor = {};
|
||||
|
||||
WP<IPointer> m_self;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ CMouse::CMouse(SP<Aquamarine::IPointer> mouse_) : m_mouse(mouse_) {
|
|||
if (!m_mouse)
|
||||
return;
|
||||
|
||||
if (auto handle = m_mouse->getLibinputHandle()) {
|
||||
double w = 0, h = 0;
|
||||
m_isTouchpad = libinput_device_has_capability(handle, LIBINPUT_DEVICE_CAP_POINTER) && libinput_device_get_size(handle, &w, &h) == 0;
|
||||
}
|
||||
|
||||
m_listeners.destroy = m_mouse->events.destroy.listen([this] {
|
||||
m_mouse.reset();
|
||||
m_events.destroy.emit();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue