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.h (1 of 2 files). Show all

Unified · Split

interface/src/scripting/DesktopScriptingInterface.h+8−0
@@ -104,6 +104,13 @@ public: · 103 unmodified lines
104 int getWidth();104 int getWidth();
105 int getHeight();105 int getHeight();
106 106
107 /*@jsdoc
108 * Checks whether the keyboard focus belongs to overlay UI window.
109 * @function Desktop.isOverlayWindowFocused
110 * @returns {boolean} <code>true</code> if the keyboard focus is on overlay UI window, <code>false</code> if not.
111 */
112 Q_INVOKABLE bool isOverlayWindowFocused() { return _isOverlayWindowFocused; };
113
107signals:114signals:
108 115
109 /*@jsdoc116 /*@jsdoc
@@ -124,6 +131,7 @@ private: · 14 unmodified lines
124 static QVariantMap getRelativePositionAnchor();131 static QVariantMap getRelativePositionAnchor();
125 Q_INVOKABLE static QVariantMap getPresentationMode();132 Q_INVOKABLE static QVariantMap getPresentationMode();
126 const bool _restricted;133 const bool _restricted;
134 std::atomic<bool> _isOverlayWindowFocused { false };
127};135};
128 136
129 137