Focus locking and popups

This commit is contained in:
IlyaShurupov 2024-10-17 15:10:58 +03:00 committed by Ilya Shurupov
parent 96b293d1b5
commit c7496c7b42
13 changed files with 296 additions and 145 deletions

View file

@ -5,6 +5,7 @@
#include <map>
namespace tp {
// FIXME : desperately needs refactor
class UpdateManager {
friend DebugManager;
@ -13,6 +14,9 @@ namespace tp {
void scheduleUpdate(Widget* widget, const char* reason);
void lockFocus(Widget* widget);
void freeFocus(Widget* widget);
[[nodiscard]] bool isPendingUpdates() const {
return !mTriggeredWidgets.empty();
}
@ -34,6 +38,7 @@ namespace tp {
private:
std::map<Widget*, bool> mTriggeredWidgets;
Widget* mInFocusWidget = nullptr;
Widget* mFocusLockWidget = nullptr;
private:
int mDebugWidgetsToProcess = 0;