History

Added an API function to check if an overlay has keyboard focus

ksuprynowicz committed 3 years ago

Commit 025f5301 parent 3d4a9932 files · +11 −1Browse files

Showing the changes to interface/src/scripting/DesktopScriptingInterface.cpp (1 of 2 files). Show all

Unified · Split

interface/src/scripting/DesktopScriptingInterface.cpp+3−1
@@ -60,7 +60,9 @@ static const QVariantMap RELATIVE_POSITION_ANCHOR { · 59 unmodified lines
6060 };
6161
6262 DesktopScriptingInterface::DesktopScriptingInterface(QObject* parent, bool restricted)
63− : QObject(parent), _restricted(restricted) { }
63+ : QObject(parent), _restricted(restricted) {
64+ connect(this, &DesktopScriptingInterface::uiFocusChanged, [this] (bool isActive) { _isOverlayWindowFocused = isActive; });
65+}
6466
6567 int DesktopScriptingInterface::getWidth() {
6668 QSize size = qApp->getWindow()->windowHandle()->screen()->virtualSize();