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
60};60};
61 61
62DesktopScriptingInterface::DesktopScriptingInterface(QObject* parent, bool restricted) 62DesktopScriptingInterface::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}
64 66
65int DesktopScriptingInterface::getWidth() {67int DesktopScriptingInterface::getWidth() {
66 QSize size = qApp->getWindow()->windowHandle()->screen()->virtualSize();68 QSize size = qApp->getWindow()->windowHandle()->screen()->virtualSize();