summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@redhat.com>2008-11-11 22:50:35 +1000
committerPeter Hutterer <peter.hutterer@redhat.com>2008-11-13 17:06:32 +1000
commitf5841e96487234df5ead5f5c0fb3c587c418cb46 (patch)
tree25db831b61d0f8bbdfc46cb2d410063e2c561a5d /dix
parent26f701704b4e536cd91bd8a9f7d2194793471998 (diff)
dix: don't store enter/leave and focus semaphores in a devPrivate.
We need them for each window, every time a window is allocated. Storing them in a devPrivate is the wrong thing to do. This also removes the unused ENTER_LEAVE_SEMAPHORE_ISSET macro. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'dix')
-rw-r--r--dix/events.c8
-rw-r--r--dix/window.c6
2 files changed, 4 insertions, 10 deletions
diff --git a/dix/events.c b/dix/events.c
index 33936bddc..ae38f2403 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -6266,13 +6266,11 @@ ExtGrabDevice(ClientPtr client,
int
EnterLeaveSemaphoresIsset(WindowPtr win)
{
- FocusSemaphoresPtr sem;
int set = 0;
int i;
- sem = (FocusSemaphoresPtr)dixLookupPrivate(&win->devPrivates, FocusPrivatesKey);
for (i = 0; i < (MAXDEVICES + 7)/8; i++)
- set += sem->enterleave[i];
+ set += win->enterleave[i];
return set;
}
@@ -6283,13 +6281,11 @@ EnterLeaveSemaphoresIsset(WindowPtr win)
int
FocusSemaphoresIsset(WindowPtr win)
{
- FocusSemaphoresPtr sem;
int set = 0;
int i;
- sem = (FocusSemaphoresPtr)dixLookupPrivate(&win->devPrivates, FocusPrivatesKey);
for (i = 0; i < (MAXDEVICES + 7)/8; i++)
- set += sem->focusinout[i];
+ set += win->focusinout[i];
return set;
}
diff --git a/dix/window.c b/dix/window.c
index 1a28d27c6..ff5ba4acc 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -271,8 +271,6 @@ Bool enableBackingStore = FALSE;
static void
SetWindowToDefaults(WindowPtr pWin)
{
- FocusSemaphoresPtr sem;
-
pWin->prevSib = NullWindow;
pWin->firstChild = NullWindow;
pWin->lastChild = NullWindow;
@@ -302,8 +300,8 @@ SetWindowToDefaults(WindowPtr pWin)
pWin->redirectDraw = RedirectDrawNone;
pWin->forcedBG = FALSE;
- sem = xcalloc(1, sizeof(FocusSemaphoresRec));
- dixSetPrivate(&pWin->devPrivates, FocusPrivatesKey, sem);
+ memset(pWin->enterleave, 0, sizeof(pWin->enterleave));
+ memset(pWin->focusinout, 0, sizeof(pWin->focusinout));
#ifdef ROOTLESS
pWin->rootlessUnhittable = FALSE;