summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2008-04-27 02:52:42 +0200
committerjcid <devnull@localhost>2008-04-27 02:52:42 +0200
commit7c2d496ee71f87d985be644679de8017801c5d5c (patch)
tree84be5b940e3de9a39facde8fff10573df3957615 /src
parent389fa1dfcc4c1ac87d3ff1d40038561700df8e01 (diff)
- Made dillo windows not to close upon Escape keypress.
Diffstat (limited to 'src')
-rw-r--r--src/ui.cc11
1 files changed, 6 insertions, 5 deletions
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 == '.') {