aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2012-12-20 00:30:29 +0000
committercorvid <corvid@lavabit.com>2012-12-20 00:30:29 +0000
commitfce22e343aae5489b2fc0e33f272ec1849b45ec3 (patch)
treee8abbd3d41e443d41853f645c1ae3ff61c96adeb /src
parent9199da7f01f8b0197f4c370874eedc47b57db407 (diff)
don't let unhandled Escape close a browser window
I noticed this with shift-Escape, but it would also happen with plain Escape if mapped to nop in keysrc.
Diffstat (limited to 'src')
-rw-r--r--src/uicmd.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/uicmd.cc b/src/uicmd.cc
index de90748f..a5280b76 100644
--- a/src/uicmd.cc
+++ b/src/uicmd.cc
@@ -481,6 +481,12 @@ static void win_cb (Fl_Widget *w, void *cb_data) {
CustTabs *tabs = (CustTabs*) cb_data;
int choice = 1, ntabs = tabs->num_tabs();
+ if (Fl::event_key() == FL_Escape) {
+ // Don't let FLTK close a browser window due to unhandled Escape
+ // (most likely with modifiers).
+ return;
+ }
+
if (prefs.show_quit_dialog && ntabs > 1)
choice = a_Dialog_choice5("Dillo: Close window?",
"Window contains more than one tab.",