-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libgestures: move everything to libgestures namespace
- Loading branch information
Showing
50 changed files
with
401 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,23 @@ | ||
add_subdirectory(kwin) | ||
add_subdirectory(libgestures) | ||
|
||
set(libgestures_SRCS | ||
libgestures/libgestures/actions/action.cpp | ||
libgestures/libgestures/actions/command.cpp | ||
libgestures/libgestures/actions/kdeglobalshortcut.cpp | ||
libgestures/libgestures/actions/keysequence.cpp | ||
libgestures/libgestures/gestures/gesture.cpp | ||
libgestures/libgestures/gestures/gesturerecognizer.cpp | ||
libgestures/libgestures/gestures/holdgesture.cpp | ||
libgestures/libgestures/gestures/pinchgesture.cpp | ||
libgestures/libgestures/gestures/swipegesture.cpp | ||
libgestures/libgestures/condition.cpp | ||
libgestures/libgestures/input.h | ||
libgestures/libgestures/windowinfoprovider.cpp | ||
) | ||
|
||
add_library(libgestures STATIC ${libgestures_SRCS}) | ||
target_link_libraries(libgestures PRIVATE | ||
Qt6::Core | ||
Qt6::DBus | ||
) | ||
target_include_directories(libgestures PUBLIC libgestures) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
src/kwin/impl/kwinvirtualinputdevice.cpp → src/kwin/impl/kwininput.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "effect/effecthandler.h" | ||
#include "kwinwindowinfoprovider.h" | ||
#include "window.h" | ||
|
||
std::optional<const libgestures::WindowInfo> KWinWindowInfoProvider::activeWindow() const | ||
{ | ||
const auto window = KWin::effects->activeWindow(); | ||
if (!window) | ||
return std::nullopt; | ||
|
||
libgestures::WindowState state = libgestures::WindowState::Unimportant; | ||
if (window->isFullScreen()) | ||
state = state | libgestures::WindowState::Fullscreen; | ||
if (window->frameGeometry() == KWin::effects->clientArea(KWin::MaximizeArea, KWin::effects->activeScreen(), KWin::effects->currentDesktop())) | ||
state = state | libgestures::WindowState::Maximized; | ||
|
||
return libgestures::WindowInfo(window->caption(), window->window()->resourceClass(), window->window()->resourceName(), state); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#pragma once | ||
|
||
#include "libgestures/windowinfoprovider.h" | ||
|
||
class KWinWindowInfoProvider : public libgestures::WindowInfoProvider | ||
{ | ||
public: | ||
KWinWindowInfoProvider() = default; | ||
|
||
[[nodiscard]] std::optional<const libgestures::WindowInfo> activeWindow() const override; | ||
}; |
Oops, something went wrong.