summaryrefslogtreecommitdiff
path: root/src/Fl.cxx
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>2000-02-18 07:11:09 +0000
committerBill Spitzak <spitzak@gmail.com>2000-02-18 07:11:09 +0000
commit0bd9018d649616ec81430bc5c3a2ad2b4f46575a (patch)
treee6f86630a8c5b305f7aea5b9c2b4337271b31513 /src/Fl.cxx
parent415db360a1c48dec11ef97857efa575221edc1e2 (diff)
Fixed the Ctrl+P shortcut problem reported by dalitz@infotech.de
The previous keystroke is not confused with a navigation control key when the window focus changes. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1003 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl.cxx')
-rw-r--r--src/Fl.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index dd630f286..3d22c29e7 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -1,6 +1,6 @@
#include <stdio.h>
//
-// "$Id: Fl.cxx,v 1.24.2.15 2000/02/15 08:31:45 bill Exp $"
+// "$Id: Fl.cxx,v 1.24.2.16 2000/02/18 07:11:08 bill Exp $"
//
// Main event handling code for the Fast Light Tool Kit (FLTK).
//
@@ -352,6 +352,8 @@ void fl_fix_focus() {
if (Fl::grab()) return; // don't do anything while grab is on.
+ Fl::e_keysym = 0; // make sure it is not confused with navigation key
+
// set focus based on Fl::modal() and fl_xfocus
Fl_Widget* w = fl_xfocus;
if (w) {
@@ -480,12 +482,11 @@ int Fl::handle(int event, Fl_Window* window)
window = 0;
case FL_FOCUS:
fl_xfocus = window;
- e_keysym = 0; // make sure it is not confused with navigation key
fl_fix_focus();
return 1;
case FL_KEYBOARD:
- fl_xfocus = window; // this should already be set, but just in case.
+ fl_xfocus = window; // this should not happen! But maybe it does:
// Try it as keystroke, sending it to focus and all parents:
for (w = grab() ? grab() : focus(); w; w = w->parent())
@@ -705,5 +706,5 @@ int fl_old_shortcut(const char* s) {
}
//
-// End of "$Id: Fl.cxx,v 1.24.2.15 2000/02/15 08:31:45 bill Exp $".
+// End of "$Id: Fl.cxx,v 1.24.2.16 2000/02/18 07:11:08 bill Exp $".
//