Commit add88193 authored by Mike Gabriel's avatar Mike Gabriel

hw/nxagent/NXevents.c: Shrink file, drop duplicate code that can identically be…

hw/nxagent/NXevents.c: Shrink file, drop duplicate code that can identically be found in dix/events.c.
parent 0571ece6
...@@ -15,12 +15,14 @@ FFS_OBJ = ffs.o ...@@ -15,12 +15,14 @@ FFS_OBJ = ffs.o
#if (!(defined(NXAgentServer) && NXAgentServer)) #if (!(defined(NXAgentServer) && NXAgentServer))
NXAGENT_SKIP_SRCS = \ NXAGENT_SKIP_SRCS = \
events.c \
extension.c \ extension.c \
glyphcurs.c \ glyphcurs.c \
resource.c \ resource.c \
window.c \ window.c \
$(NULL) $(NULL)
NXAGENT_SKIP_OBJS = \ NXAGENT_SKIP_OBJS = \
events.o \
extension.o \ extension.o \
glyphcurs.o \ glyphcurs.o \
resource.o \ resource.o \
...@@ -36,7 +38,6 @@ SRCS = \ ...@@ -36,7 +38,6 @@ SRCS = \
devices.c \ devices.c \
dispatch.c \ dispatch.c \
dixutils.c \ dixutils.c \
events.c \
gc.c \ gc.c \
globals.c \ globals.c \
grabs.c \ grabs.c \
...@@ -61,7 +62,6 @@ OBJS = \ ...@@ -61,7 +62,6 @@ OBJS = \
devices.o \ devices.o \
dispatch.o \ dispatch.o \
dixutils.o \ dixutils.o \
events.o \
gc.o \ gc.o \
globals.o \ globals.o \
grabs.o \ grabs.o \
......
...@@ -1218,6 +1218,7 @@ CheckGrabForSyncs(register DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) ...@@ -1218,6 +1218,7 @@ CheckGrabForSyncs(register DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
ComputeFreezes(); ComputeFreezes();
} }
#ifndef NXAGENT_SERVER
void void
ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab, ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
TimeStamp time, Bool autoGrab) TimeStamp time, Bool autoGrab)
...@@ -1269,6 +1270,7 @@ DeactivatePointerGrab(register DeviceIntPtr mouse) ...@@ -1269,6 +1270,7 @@ DeactivatePointerGrab(register DeviceIntPtr mouse)
FreeCursor(grab->cursor, (Cursor)0); FreeCursor(grab->cursor, (Cursor)0);
ComputeFreezes(); ComputeFreezes();
} }
#endif /* NXAGENT_SERVER */
void void
ActivateKeyboardGrab(register DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool passive) ActivateKeyboardGrab(register DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool passive)
...@@ -1914,6 +1916,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y) ...@@ -1914,6 +1916,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
return FALSE; return FALSE;
} }
#ifndef NXAGENT_SERVER
static WindowPtr static WindowPtr
XYToWindow(int x, int y) XYToWindow(int x, int y)
{ {
...@@ -1961,6 +1964,7 @@ XYToWindow(int x, int y) ...@@ -1961,6 +1964,7 @@ XYToWindow(int x, int y)
} }
return spriteTrace[spriteTraceGood-1]; return spriteTrace[spriteTraceGood-1];
} }
#endif /* NXAGENT_SERVER */
static Bool static Bool
CheckMotion(xEvent *xE) CheckMotion(xEvent *xE)
...@@ -2072,6 +2076,7 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) ...@@ -2072,6 +2076,7 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
} }
#endif #endif
#ifndef NXAGENT_SERVER
void void
DefineInitialRootWindow(register WindowPtr win) DefineInitialRootWindow(register WindowPtr win)
{ {
...@@ -2113,6 +2118,7 @@ DefineInitialRootWindow(register WindowPtr win) ...@@ -2113,6 +2118,7 @@ DefineInitialRootWindow(register WindowPtr win)
} }
#endif #endif
} }
#endif /* NXAGENT_SERVER */
/* /*
* This does not take any shortcuts, and even ignores its argument, since * This does not take any shortcuts, and even ignores its argument, since
...@@ -3140,6 +3146,7 @@ EnterLeaveEvent( ...@@ -3140,6 +3146,7 @@ EnterLeaveEvent(
} }
if (mask & filters[type]) if (mask & filters[type])
{ {
memset(&event, 0, sizeof(xEvent));
event.u.u.type = type; event.u.u.type = type;
event.u.u.detail = detail; event.u.u.detail = detail;
event.u.enterLeave.time = currentTime.milliseconds; event.u.enterLeave.time = currentTime.milliseconds;
...@@ -3966,6 +3973,7 @@ CloseDownEvents(void) ...@@ -3966,6 +3973,7 @@ CloseDownEvents(void)
spriteTraceSize = 0; spriteTraceSize = 0;
} }
#ifndef NXAGENT_SERVER
int int
ProcSendEvent(ClientPtr client) ProcSendEvent(ClientPtr client)
{ {
...@@ -4053,6 +4061,7 @@ ProcSendEvent(ClientPtr client) ...@@ -4053,6 +4061,7 @@ ProcSendEvent(ClientPtr client)
NullGrab, 0); NullGrab, 0);
return Success; return Success;
} }
#endif /* NXAGENT_SERVER */
int int
ProcUngrabKey(ClientPtr client) ProcUngrabKey(ClientPtr client)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment