aboutsummaryrefslogtreecommitdiff
path: root/src/widgets/BrowserApp.cpp
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-04-02 20:49:49 +0530
committerAkshay Nair <phenax5@gmail.com>2025-04-02 20:49:49 +0530
commit96727d6e63ca927f3c7b68d4baa4fe672a4dcd0b (patch)
tree2e5b99bb3324a35a0bd9ecdaa2caefcf9260767a /src/widgets/BrowserApp.cpp
parent4f945367ebc8e34263acbfca0416e3f75653924e (diff)
downloadnull-browser-96727d6e63ca927f3c7b68d4baa4fe672a4dcd0b.tar.gz
null-browser-96727d6e63ca927f3c7b68d4baa4fe672a4dcd0b.zip
Add events system for lua runtime to dispatch and register events
Diffstat (limited to 'src/widgets/BrowserApp.cpp')
-rw-r--r--src/widgets/BrowserApp.cpp14
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;