mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-09 00:21:56 -07:00
added workspace swipe fingers
This commit is contained in:
@@ -126,6 +126,7 @@ void CConfigManager::setDefaultVars() {
|
|||||||
configValues["input:touchpad:drag_lock"].intValue = 0;
|
configValues["input:touchpad:drag_lock"].intValue = 0;
|
||||||
|
|
||||||
configValues["gestures:workspace_swipe"].intValue = 0;
|
configValues["gestures:workspace_swipe"].intValue = 0;
|
||||||
|
configValues["gestures:workspace_swipe_fingers"].intValue = 3;
|
||||||
configValues["gestures:workspace_swipe_distance"].intValue = 300;
|
configValues["gestures:workspace_swipe_distance"].intValue = 300;
|
||||||
configValues["gestures:workspace_swipe_invert"].intValue = 1;
|
configValues["gestures:workspace_swipe_invert"].intValue = 1;
|
||||||
configValues["gestures:workspace_swipe_min_speed_to_force"].intValue = 30;
|
configValues["gestures:workspace_swipe_min_speed_to_force"].intValue = 30;
|
||||||
|
@@ -4,8 +4,9 @@
|
|||||||
void CInputManager::onSwipeBegin(wlr_pointer_swipe_begin_event* e) {
|
void CInputManager::onSwipeBegin(wlr_pointer_swipe_begin_event* e) {
|
||||||
|
|
||||||
static auto *const PSWIPE = &g_pConfigManager->getConfigValuePtr("gestures:workspace_swipe")->intValue;
|
static auto *const PSWIPE = &g_pConfigManager->getConfigValuePtr("gestures:workspace_swipe")->intValue;
|
||||||
|
static auto *const PSWIPEFINGERS = &g_pConfigManager->getConfigValuePtr("gestures:workspace_swipe_fingers")->intValue;
|
||||||
|
|
||||||
if (e->fingers < 3 || *PSWIPE == 0)
|
if (e->fingers != *PSWIPEFINGERS|| *PSWIPE == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(g_pCompositor->m_pLastMonitor->activeWorkspace);
|
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(g_pCompositor->m_pLastMonitor->activeWorkspace);
|
||||||
|
Reference in New Issue
Block a user