aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2023-05-14 13:54:55 +0100
committervaxerski <[email protected]>2023-05-14 13:54:55 +0100
commit7c207243e41b5b4f35d790767ad2e21eba1b7a0b (patch)
tree489a836ffaf83ccedd469978e8ce902ae0d959ca
parentb748b0734f27c978758c45b6e18520f7522b9d6f (diff)
downloadHyprland-7c207243e41b5b4f35d790767ad2e21eba1b7a0b.tar.gz
Hyprland-7c207243e41b5b4f35d790767ad2e21eba1b7a0b.zip
input: check for matrix availability in touch config
-rw-r--r--src/managers/input/InputManager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index 189cdf84..a1833a25 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -1329,7 +1329,8 @@ void CInputManager::setTouchDeviceConfigs() {
const int ROTATION =
std::clamp(HASCONFIG ? g_pConfigManager->getDeviceInt(PTOUCHDEV->name, "transform") : g_pConfigManager->getInt("input:touchdevice:transform"), 0, 7);
- libinput_device_config_calibration_set_matrix(LIBINPUTDEV, MATRICES[ROTATION]);
+ if (libinput_device_config_calibration_has_matrix(LIBINPUTDEV))
+ libinput_device_config_calibration_set_matrix(LIBINPUTDEV, MATRICES[ROTATION]);
const auto OUTPUT = HASCONFIG ? g_pConfigManager->getDeviceString(PTOUCHDEV->name, "output") : g_pConfigManager->getString("input:touchdevice:output");
if (!OUTPUT.empty() && OUTPUT != STRVAL_EMPTY)