Showing the changes to interface/src/scripting/DesktopScriptingInterface.h (1 of 2 files). Show all
Unified · Split
| @@ -104,6 +104,13 @@ public: · 103 unmodified lines | ||
| 104 | 104 | int getWidth(); |
| 105 | 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 | + | |
| 107 | 114 | signals: |
| 108 | 115 | |
| 109 | 116 | /*@jsdoc |
| @@ -124,6 +131,7 @@ private: · 14 unmodified lines | ||
| 124 | 131 | static QVariantMap getRelativePositionAnchor(); |
| 125 | 132 | Q_INVOKABLE static QVariantMap getPresentationMode(); |
| 126 | 133 | const bool _restricted; |
| 134 | + std::atomic<bool> _isOverlayWindowFocused { false }; | |
| 127 | 135 | }; |
| 128 | 136 | |
| 129 | 137 | |