Unverified Commit 753535e3 authored by Mike Gabriel's avatar Mike Gabriel

Merge branch 'uli42-pr/simplify_nxevents' into 3.6.x

parents bdcb5a18 283e4523
...@@ -1216,10 +1216,14 @@ CheckGrabForSyncs(register DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) ...@@ -1216,10 +1216,14 @@ CheckGrabForSyncs(register DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
ComputeFreezes(); ComputeFreezes();
} }
#ifndef NXAGENT_SERVER
void void
ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab, #ifdef NXAGENT_SERVER
xorg_ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
TimeStamp time, Bool autoGrab)
#else
ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
TimeStamp time, Bool autoGrab) TimeStamp time, Bool autoGrab)
#endif
{ {
WindowPtr oldWin = (mouse->grab) ? mouse->grab->window WindowPtr oldWin = (mouse->grab) ? mouse->grab->window
: sprite.win; : sprite.win;
...@@ -1246,7 +1250,11 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab, ...@@ -1246,7 +1250,11 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
} }
void void
#ifdef NXAGENT_SERVER
xorg_DeactivatePointerGrab(register DeviceIntPtr mouse)
#else
DeactivatePointerGrab(register DeviceIntPtr mouse) DeactivatePointerGrab(register DeviceIntPtr mouse)
#endif
{ {
register GrabPtr grab = mouse->grab; register GrabPtr grab = mouse->grab;
register DeviceIntPtr dev; register DeviceIntPtr dev;
...@@ -1268,7 +1276,6 @@ DeactivatePointerGrab(register DeviceIntPtr mouse) ...@@ -1268,7 +1276,6 @@ 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)
...@@ -1429,7 +1436,11 @@ AllowSome(ClientPtr client, TimeStamp time, DeviceIntPtr thisDev, int newState) ...@@ -1429,7 +1436,11 @@ AllowSome(ClientPtr client, TimeStamp time, DeviceIntPtr thisDev, int newState)
} }
int int
#ifdef NXAGENT_SERVER
xorg_ProcAllowEvents(register ClientPtr client)
#else
ProcAllowEvents(register ClientPtr client) ProcAllowEvents(register ClientPtr client)
#endif
{ {
TimeStamp time; TimeStamp time;
DeviceIntPtr mouse = inputInfo.pointer; DeviceIntPtr mouse = inputInfo.pointer;
...@@ -1903,7 +1914,17 @@ PointInBorderSize(WindowPtr pWin, int x, int y) ...@@ -1903,7 +1914,17 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
return FALSE; return FALSE;
} }
#ifndef NXAGENT_SERVER /* define XYWINDOWCALLBACK if your DDX provides this callback */
static WindowPtr GetXYStartWindow(WindowPtr pWin);
#ifndef XYWINDOWCALLBACK
static WindowPtr GetXYStartWindow(WindowPtr pWin)
{
return pWin;
}
#endif
static WindowPtr static WindowPtr
XYToWindow(int x, int y) XYToWindow(int x, int y)
{ {
...@@ -1911,7 +1932,7 @@ XYToWindow(int x, int y) ...@@ -1911,7 +1932,7 @@ XYToWindow(int x, int y)
BoxRec box; BoxRec box;
spriteTraceGood = 1; /* root window still there */ spriteTraceGood = 1; /* root window still there */
pWin = ROOT->firstChild; pWin = GetXYStartWindow(ROOT->firstChild);
while (pWin) while (pWin)
{ {
if ((pWin->mapped) && if ((pWin->mapped) &&
...@@ -1949,7 +1970,6 @@ XYToWindow(int x, int y) ...@@ -1949,7 +1970,6 @@ XYToWindow(int x, int y)
} }
return spriteTrace[spriteTraceGood-1]; return spriteTrace[spriteTraceGood-1];
} }
#endif /* NXAGENT_SERVER */
#ifndef NXAGENT_SERVER #ifndef NXAGENT_SERVER
static Bool static Bool
...@@ -2063,9 +2083,12 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) ...@@ -2063,9 +2083,12 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
} }
#endif #endif
#ifndef NXAGENT_SERVER
void void
#ifdef NXAGENT_SERVER
xorg_DefineInitialRootWindow(register WindowPtr win)
#else
DefineInitialRootWindow(register WindowPtr win) DefineInitialRootWindow(register WindowPtr win)
#endif
{ {
register ScreenPtr pScreen = win->drawable.pScreen; register ScreenPtr pScreen = win->drawable.pScreen;
...@@ -2105,7 +2128,6 @@ DefineInitialRootWindow(register WindowPtr win) ...@@ -2105,7 +2128,6 @@ 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
...@@ -3940,9 +3962,12 @@ CloseDownEvents(void) ...@@ -3940,9 +3962,12 @@ CloseDownEvents(void)
spriteTraceSize = 0; spriteTraceSize = 0;
} }
#ifndef NXAGENT_SERVER
int int
#ifdef NXAGENT_SERVER
xorg_ProcSendEvent(ClientPtr client)
#else
ProcSendEvent(ClientPtr client) ProcSendEvent(ClientPtr client)
#endif
{ {
WindowPtr pWin; WindowPtr pWin;
WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */ WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */
...@@ -4027,7 +4052,6 @@ ProcSendEvent(ClientPtr client) ...@@ -4027,7 +4052,6 @@ ProcSendEvent(ClientPtr client)
NullGrab, 0); NullGrab, 0);
return Success; return Success;
} }
#endif /* NXAGENT_SERVER */
int int
ProcUngrabKey(ClientPtr client) ProcUngrabKey(ClientPtr client)
......
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