Commit 09ba97b2 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

NXdispatch.c: Use Callback instead of a modified function

parent 2972f6af
......@@ -143,6 +143,11 @@ void OsVendorEndRedirectErrorFFunction();
static void nxagentGrabServerCallback(CallbackListPtr *callbacks, void *data,
void *args);
#ifdef NXAGENT_CLIPBOARD
extern void nxagentSetSelectionCallback(CallbackListPtr *callbacks, void *data,
void *args);
#endif
void ddxInitGlobals(void)
{
/*
......@@ -411,6 +416,10 @@ FIXME: These variables, if not removed at all because have probably
blackRoot = TRUE;
nxagentInitKeystrokes(False);
#ifdef NXAGENT_CLIPBOARD
AddCallback(&SelectionCallback, nxagentSetSelectionCallback, NULL);
#endif
}
void
......
......@@ -764,15 +764,6 @@ ProcSetSelectionOwner(register ClientPtr client)
CallCallbacks(&SelectionCallback, &info);
}
#ifdef NXAGENT_CLIPBOARD
if ((CurrentSelections[i].pWin != NULL) &&
(nxagentOption(Clipboard) != ClipboardNone) &&
((CurrentSelections[i].selection == XA_PRIMARY) ||
(CurrentSelections[i].selection == MakeAtom("CLIPBOARD", 9, 0))))
{
nxagentSetSelectionOwner(&CurrentSelections[i]);
}
#endif
return (client->noClientException);
}
else
......
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