diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-04-05 23:45:55 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-04-06 00:47:02 +0530 |
| commit | bbde1438e9c31cc83d8c4835ea97a0eaeae4e192 (patch) | |
| tree | 88840b73176dee8bd7da70c36f19a32bafdd5d6c /src/widgets/WebViewStack.cpp | |
| parent | b77a6444f94ce8d05962af9039c31851e224be5c (diff) | |
| download | null-browser-bbde1438e9c31cc83d8c4835ea97a0eaeae4e192.tar.gz null-browser-bbde1438e9c31cc83d8c4835ea97a0eaeae4e192.zip | |
Close window when no tabs left
Diffstat (limited to '')
| -rw-r--r-- | src/widgets/WebViewStack.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/widgets/WebViewStack.cpp b/src/widgets/WebViewStack.cpp index ae95ea6..8c432f1 100644 --- a/src/widgets/WebViewStack.cpp +++ b/src/widgets/WebViewStack.cpp @@ -125,13 +125,12 @@ void WebViewStack::close(WebViewId webview_id) { disconnect(webview->page()); webview->deleteLater(); - // TODO: Focus on different webview - // focus_webview(); - - // TODO: Close window on empty if (webview_list.isEmpty()) { - // window()->close(); - create_new_webview(configuration->new_tab_url, true); + if (configuration->close_window_when_no_tabs) { + emit close_window_requested(); + } else { + create_new_webview(configuration->new_tab_url, true); + } } } |
