gestures: add cursor zoom (#13033)
This commit is contained in:
parent
95c8f8b299
commit
d9d9d9358f
3 changed files with 62 additions and 1 deletions
|
|
@ -39,6 +39,7 @@
|
|||
#include "../managers/input/trackpad/gestures/CloseGesture.hpp"
|
||||
#include "../managers/input/trackpad/gestures/FloatGesture.hpp"
|
||||
#include "../managers/input/trackpad/gestures/FullscreenGesture.hpp"
|
||||
#include "../managers/input/trackpad/gestures/CursorZoomGesture.hpp"
|
||||
|
||||
#include "../managers/HookSystemManager.hpp"
|
||||
#include "../protocols/types/ContentType.hpp"
|
||||
|
|
@ -2917,7 +2918,10 @@ std::optional<std::string> CConfigManager::handleGesture(const std::string& comm
|
|||
else if (data[startDataIdx] == "fullscreen")
|
||||
result = g_pTrackpadGestures->addGesture(makeUnique<CFullscreenTrackpadGesture>(std::string{data[startDataIdx + 1]}), fingerCount, direction, modMask, deltaScale,
|
||||
disableInhibit);
|
||||
else if (data[startDataIdx] == "unset")
|
||||
else if (data[startDataIdx] == "cursorZoom") {
|
||||
result = g_pTrackpadGestures->addGesture(makeUnique<CCursorZoomTrackpadGesture>(std::string{data[startDataIdx + 1]}, std::string{data[startDataIdx + 2]}), fingerCount,
|
||||
direction, modMask, deltaScale, disableInhibit);
|
||||
} else if (data[startDataIdx] == "unset")
|
||||
result = g_pTrackpadGestures->removeGesture(fingerCount, direction, modMask, deltaScale, disableInhibit);
|
||||
else
|
||||
return std::format("Invalid gesture: {}", data[startDataIdx]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue