summaryrefslogtreecommitdiff
path: root/include/input.h
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 /include/input.h
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 'include/input.h')
-rw-r--r--include/input.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/include/input.h b/include/input.h
index 0d348ec38..a41affd21 100644
--- a/include/input.h
+++ b/include/input.h
@@ -92,18 +92,10 @@ SOFTWARE.
/* Used for enter/leave and focus in/out semaphores */
#define SEMAPHORE_FIELD_SET(win, dev, field) \
-{ \
- FocusSemaphoresPtr sem; \
- sem = (FocusSemaphoresPtr)dixLookupPrivate(&win->devPrivates, FocusPrivatesKey); \
- sem->field[dev->id/8] |= (1 << (dev->id % 8)); \
-}
+ (win)->field[(dev)->id/8] |= (1 << ((dev)->id % 8)); \
#define SEMAPHORE_FIELD_UNSET(win, dev, field) \
-{ \
- FocusSemaphoresPtr sem; \
- sem = (FocusSemaphoresPtr)dixLookupPrivate(&win->devPrivates, FocusPrivatesKey); \
- sem->field[dev->id/8] &= ~(1 << (dev->id % 8)); \
-}
+ (win)->field[(dev)->id/8] &= ~(1 << ((dev)->id % 8));
#define ENTER_LEAVE_SEMAPHORE_SET(win, dev) \
SEMAPHORE_FIELD_SET(win, dev, enterleave);
@@ -111,9 +103,6 @@ SOFTWARE.
#define ENTER_LEAVE_SEMAPHORE_UNSET(win, dev) \
SEMAPHORE_FIELD_UNSET(win, dev, enterleave);
-#define ENTER_LEAVE_SEMAPHORE_ISSET(win, dev) \
- ((FocusSemaphoresPtr)dixLookupPrivate(&win->devPrivates, FocusPrivatesKey))->enterleave[dev->id/8] & (1 << (dev->id % 8))
-
#define FOCUS_SEMAPHORE_SET(win, dev) \
SEMAPHORE_FIELD_SET(win, dev, focusinout);
@@ -121,7 +110,7 @@ SOFTWARE.
SEMAPHORE_FIELD_UNSET(win, dev, focusinout);
#define FOCUS_SEMAPHORE_ISSET(win, dev) \
- ((FocusSemaphoresPtr)dixLookupPrivate(&win->devPrivates, FocusPrivatesKey))->focusinout[dev->id/8] & (1 << (dev->id % 8))
+ (win)->focusinout[(dev)->id/8] & (1 << ((dev)->id % 8))
typedef unsigned long Leds;
typedef struct _OtherClients *OtherClientsPtr;