summaryrefslogtreecommitdiff
path: root/dix/window.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-04-17 16:51:16 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-04-17 16:51:16 +0930
commitb6aec7f6f906a18d13586d63afabf1ee4fbb11c3 (patch)
treef0a289eef86881bd4e7bb3c989fe6edb979308a0 /dix/window.c
parent451d5464b4e8a2516b8a4598b3c4eb14656be90e (diff)
Change FocusIn/Out semantics to match Enter/Leave semantics.
Diffstat (limited to 'dix/window.c')
-rw-r--r--dix/window.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/dix/window.c b/dix/window.c
index 5a03642d8..484693906 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -155,7 +155,7 @@ _X_EXPORT int screenIsSaved = SCREEN_SAVER_OFF;
_X_EXPORT ScreenSaverStuffRec savedScreenInfo[MAXSCREENS];
-_X_EXPORT int EnterLeavePrivatesIndex = -1;
+_X_EXPORT int FocusPrivatesIndex = -1;
#if 0
extern void DeleteWindowFromAnyEvents();
@@ -312,6 +312,12 @@ SetWindowToDefaults(WindowPtr pWin)
#ifdef COMPOSITE
pWin->redirectDraw = 0;
#endif
+
+ ((FocusSemaphoresPtr)
+ pWin->devPrivates[FocusPrivatesIndex].ptr)->enterleave = 0;
+ ((FocusSemaphoresPtr)
+ pWin->devPrivates[FocusPrivatesIndex].ptr)->focusinout = 0;
+
}
static void
@@ -3981,10 +3987,11 @@ WindowParentHasDeviceCursor(WindowPtr pWin,
_X_EXPORT Bool
InitWindowPrivates(ScreenPtr screen)
{
- if (EnterLeavePrivatesIndex == -1)
- EnterLeavePrivatesIndex = AllocateWindowPrivateIndex();
+ if (FocusPrivatesIndex == -1)
+ FocusPrivatesIndex = AllocateWindowPrivateIndex();
- return AllocateWindowPrivate(screen, EnterLeavePrivatesIndex, 0);
+ return AllocateWindowPrivate(screen, FocusPrivatesIndex,
+ sizeof(FocusSemaphoresRec));
}
#ifndef NOLOGOHACK