Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
5d9e0be9
Commit
5d9e0be9
authored
Mar 16, 2022
by
Eric Edlund
Browse files
make gestured desktop switching use natural directions
BUG: 185710
parent
3c557be7
Pipeline
#152227
passed with stage
in 14 minutes and 50 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/virtualdesktops.cpp
View file @
5d9e0be9
...
...
@@ -824,27 +824,27 @@ void VirtualDesktopManager::initShortcuts()
connect
(
m_swipeGestureReleasedDown
,
&
QAction
::
triggered
,
this
,
&
VirtualDesktopManager
::
gestureReleasedDown
);
//These take the live feedback from a gesture
input
()
->
registerRealtimeTouchpadSwipeShortcut
(
SwipeDirection
::
Righ
t
,
3
,
m_swipeGestureReleasedRight
,
[
this
](
qreal
cb
)
{
input
()
->
registerRealtimeTouchpadSwipeShortcut
(
SwipeDirection
::
Lef
t
,
3
,
m_swipeGestureReleasedRight
,
[
this
](
qreal
cb
)
{
m_currentDesktopOffset
.
setX
(
cb
);
Q_EMIT
currentChanging
(
current
(),
m_currentDesktopOffset
);
});
input
()
->
registerRealtimeTouchpadSwipeShortcut
(
SwipeDirection
::
Lef
t
,
3
,
m_swipeGestureReleasedLeft
,
[
this
](
qreal
cb
)
{
input
()
->
registerRealtimeTouchpadSwipeShortcut
(
SwipeDirection
::
Righ
t
,
3
,
m_swipeGestureReleasedLeft
,
[
this
](
qreal
cb
)
{
m_currentDesktopOffset
.
setX
(
-
cb
);
Q_EMIT
currentChanging
(
current
(),
m_currentDesktopOffset
);
});
input
()
->
registerRealtimeTouchpadSwipeShortcut
(
SwipeDirection
::
Righ
t
,
4
,
m_swipeGestureReleasedRight
,
[
this
](
qreal
cb
)
{
input
()
->
registerRealtimeTouchpadSwipeShortcut
(
SwipeDirection
::
Lef
t
,
4
,
m_swipeGestureReleasedRight
,
[
this
](
qreal
cb
)
{
m_currentDesktopOffset
.
setX
(
cb
);
Q_EMIT
currentChanging
(
current
(),
m_currentDesktopOffset
);
});
input
()
->
registerRealtimeTouchpadSwipeShortcut
(
SwipeDirection
::
Lef
t
,
4
,
m_swipeGestureReleasedLeft
,
[
this
](
qreal
cb
)
{
input
()
->
registerRealtimeTouchpadSwipeShortcut
(
SwipeDirection
::
Righ
t
,
4
,
m_swipeGestureReleasedLeft
,
[
this
](
qreal
cb
)
{
m_currentDesktopOffset
.
setX
(
-
cb
);
Q_EMIT
currentChanging
(
current
(),
m_currentDesktopOffset
);
});
input
()
->
registerRealtimeTouchpadSwipeShortcut
(
SwipeDirection
::
Up
,
3
,
m_swipeGestureReleasedUp
,
[
this
](
qreal
cb
)
{
input
()
->
registerRealtimeTouchpadSwipeShortcut
(
SwipeDirection
::
Down
,
3
,
m_swipeGestureReleasedUp
,
[
this
](
qreal
cb
)
{
m_currentDesktopOffset
.
setY
(
-
cb
);
Q_EMIT
currentChanging
(
current
(),
m_currentDesktopOffset
);
});
input
()
->
registerRealtimeTouchpadSwipeShortcut
(
SwipeDirection
::
Down
,
3
,
m_swipeGestureReleasedDown
,
[
this
](
qreal
cb
)
{
input
()
->
registerRealtimeTouchpadSwipeShortcut
(
SwipeDirection
::
Up
,
3
,
m_swipeGestureReleasedDown
,
[
this
](
qreal
cb
)
{
m_currentDesktopOffset
.
setY
(
cb
);
Q_EMIT
currentChanging
(
current
(),
m_currentDesktopOffset
);
});
...
...
Vlad Zahorodnii
@vladz
mentioned in commit
d3acbf01
·
Mar 19, 2022
mentioned in commit
d3acbf01
mentioned in commit d3acbf0127403e73236ebd4c72c28df77825cf6c
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment