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(); ...@@ -143,6 +143,11 @@ void OsVendorEndRedirectErrorFFunction();
static void nxagentGrabServerCallback(CallbackListPtr *callbacks, void *data, static void nxagentGrabServerCallback(CallbackListPtr *callbacks, void *data,
void *args); void *args);
#ifdef NXAGENT_CLIPBOARD
extern void nxagentSetSelectionCallback(CallbackListPtr *callbacks, void *data,
void *args);
#endif
void ddxInitGlobals(void) void ddxInitGlobals(void)
{ {
/* /*
...@@ -411,6 +416,10 @@ FIXME: These variables, if not removed at all because have probably ...@@ -411,6 +416,10 @@ FIXME: These variables, if not removed at all because have probably
blackRoot = TRUE; blackRoot = TRUE;
nxagentInitKeystrokes(False); nxagentInitKeystrokes(False);
#ifdef NXAGENT_CLIPBOARD
AddCallback(&SelectionCallback, nxagentSetSelectionCallback, NULL);
#endif
} }
void void
......
...@@ -764,15 +764,6 @@ ProcSetSelectionOwner(register ClientPtr client) ...@@ -764,15 +764,6 @@ ProcSetSelectionOwner(register ClientPtr client)
CallCallbacks(&SelectionCallback, &info); 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); return (client->noClientException);
} }
else 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