summaryrefslogtreecommitdiffstats
path: root/generic/tkFocus.c
diff options
context:
space:
mode:
authorpatthoyts@users.sourceforge.net <patthoyts>2008-11-23 21:58:24 (GMT)
committerpatthoyts@users.sourceforge.net <patthoyts>2008-11-23 21:58:24 (GMT)
commit5283d4e925aa075ceb3621410b74649e66d82699 (patch)
tree4ca0f6008e131429c87d3d92fa685222f04a00d5 /generic/tkFocus.c
parent052b284d5040f3a0e8e57414b5a2ddbc13bca4be (diff)
downloadtk-5283d4e925aa075ceb3621410b74649e66d82699.zip
tk-5283d4e925aa075ceb3621410b74649e66d82699.tar.gz
tk-5283d4e925aa075ceb3621410b74649e66d82699.tar.bz2
[Bug 1389270] event generate silently ignored focus events. These can now be generated.
Diffstat (limited to 'generic/tkFocus.c')
-rw-r--r--generic/tkFocus.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/generic/tkFocus.c b/generic/tkFocus.c
index bce8191..cbe8cda 100644
--- a/generic/tkFocus.c
+++ b/generic/tkFocus.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkFocus.c,v 1.19 2008/11/08 18:44:39 dkf Exp $
+ * RCS: @(#) $Id: tkFocus.c,v 1.20 2008/11/23 21:58:24 patthoyts Exp $
*/
#include "tkInt.h"
@@ -70,14 +70,6 @@ typedef struct TkDisplayFocusInfo {
} DisplayFocusInfo;
/*
- * The following magic value is stored in the "send_event" field of FocusIn
- * and FocusOut events that are generated in this file. This allows us to
- * separate "real" events coming from the server from those that we generated.
- */
-
-#define GENERATED_EVENT_MAGIC ((Bool) 0x547321ac)
-
-/*
* Debugging support...
*/
@@ -290,7 +282,7 @@ TkFocusFilterEvent(
* pass the event through to Tk bindings.
*/
- if (eventPtr->xfocus.send_event == GENERATED_EVENT_MAGIC) {
+ if (eventPtr->xfocus.send_event == GENERATED_FOCUS_EVENT_MAGIC) {
eventPtr->xfocus.send_event = 0;
return 1;
}
@@ -908,7 +900,7 @@ GenerateFocusEvents(
}
event.xfocus.serial = LastKnownRequestProcessed(winPtr->display);
- event.xfocus.send_event = GENERATED_EVENT_MAGIC;
+ event.xfocus.send_event = GENERATED_FOCUS_EVENT_MAGIC;
event.xfocus.display = winPtr->display;
event.xfocus.mode = NotifyNormal;
TkInOutEvents(&event, sourcePtr, destPtr, FocusOut, FocusIn,