diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-03-30 19:16:07 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-03-30 19:16:37 +0530 |
| commit | 4f945367ebc8e34263acbfca0416e3f75653924e (patch) | |
| tree | aff34361a2b2160aea284df9b619193917bcbc88 /src/WindowActionRouter.hpp | |
| parent | e690963fb6c0240171236fc2d669f95ee26b6798 (diff) | |
| download | null-browser-4f945367ebc8e34263acbfca0416e3f75653924e.tar.gz null-browser-4f945367ebc8e34263acbfca0416e3f75653924e.zip | |
Update window title on tab change + refactoring
Diffstat (limited to '')
| -rw-r--r-- | src/WindowActionRouter.hpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/WindowActionRouter.hpp b/src/WindowActionRouter.hpp index 9a5059b..384c76c 100644 --- a/src/WindowActionRouter.hpp +++ b/src/WindowActionRouter.hpp @@ -3,15 +3,25 @@ #include <QWidget> #include <QtCore> #include <cstdint> +#include <functional> #include "widgets/BrowserWindow.hpp" +#include "widgets/WebViewStack.hpp" + +#define WITH_WEBVIEW_WINDOW(WEBVIEW_ID, IDENT, BLOCK) \ + for (auto &win_match : window_map) { \ + auto *IDENT = win_match.second; \ + if (IDENT->mediator()->has_webview(WEBVIEW_ID)) { \ + BLOCK; \ + } \ + } class WindowActionRouter : public QWidget { Q_OBJECT public: - static WindowActionRouter *instance() { - static auto *router = new WindowActionRouter; + static WindowActionRouter &instance() { + static WindowActionRouter router; return router; } |
