From 7c2d496ee71f87d985be644679de8017801c5d5c Mon Sep 17 00:00:00 2001 From: jcid Date: Sun, 27 Apr 2008 02:52:42 +0200 Subject: - Made dillo windows not to close upon Escape keypress. --- src/ui.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/ui.cc b/src/ui.cc index ba686e34..4d06214a 100644 --- a/src/ui.cc +++ b/src/ui.cc @@ -697,10 +697,12 @@ int UI::handle(int event) if (k == UpKey || k == DownKey || k == SpaceKey || k == LeftKey || k == RightKey) return 0; - } + // Ignore Escape for main window. + if (k == EscapeKey) + ret = 1; - // Handle these shortcuts here. - if (event == SHORTCUT) { + } else if (event == SHORTCUT) { + // Handle these shortcuts here. if (event_state(CTRL)) { if (k == 'b') { a_UIcmd_book(user_data()); @@ -738,8 +740,7 @@ int UI::handle(int event) } // Back and Forward navigation shortcuts - if ((!event_state(SHIFT) && k == BackSpaceKey) || - k == ',') { + if ((!event_state(SHIFT) && k == BackSpaceKey) || k == ',') { a_UIcmd_back(user_data()); ret = 1; } else if ((event_state(SHIFT) && k == BackSpaceKey) || k == '.') { -- cgit v1.2.3