diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-04-02 20:49:49 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-04-02 20:49:49 +0530 |
| commit | 96727d6e63ca927f3c7b68d4baa4fe672a4dcd0b (patch) | |
| tree | 2e5b99bb3324a35a0bd9ecdaa2caefcf9260767a /src/widgets/BrowserApp.cpp | |
| parent | 4f945367ebc8e34263acbfca0416e3f75653924e (diff) | |
| download | null-browser-96727d6e63ca927f3c7b68d4baa4fe672a4dcd0b.tar.gz null-browser-96727d6e63ca927f3c7b68d4baa4fe672a4dcd0b.zip | |
Add events system for lua runtime to dispatch and register events
Diffstat (limited to '')
| -rw-r--r-- | src/widgets/BrowserApp.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/widgets/BrowserApp.cpp b/src/widgets/BrowserApp.cpp index f2d541d..d65a122 100644 --- a/src/widgets/BrowserApp.cpp +++ b/src/widgets/BrowserApp.cpp @@ -11,8 +11,7 @@ BrowserApp::BrowserApp() { lua.start_event_loop(); // Router init - auto &router = WindowActionRouter::instance(); - router.initialize(); + WindowActionRouter::instance().initialize(); // Global event filter qApp->installEventFilter(this); @@ -22,14 +21,15 @@ BrowserApp::BrowserApp() { }; BrowserWindow *BrowserApp::create_window() { - auto *win = new BrowserWindow((const Configuration &)configuration); - win->setWindowTitle("null-browser"); - WindowActionRouter::instance().add_window(win); - win->show(); - return win; + auto *window = new BrowserWindow((const Configuration &)configuration); + window->setWindowTitle("null-browser"); + WindowActionRouter::instance().add_window(window); + window->show(); + return window; } bool BrowserApp::eventFilter(QObject *target, QEvent *event) { + // TODO: Prevent key release and shortcut on mode too if (event->type() != QEvent::KeyPress) return false; |
