Unverified Commit 5405447e authored by Mike Gabriel's avatar Mike Gabriel

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

parents 3a3a3373 72c02240
...@@ -90,6 +90,7 @@ static char *nxagentAtomNames[NXAGENT_NUMBER_OF_ATOMS + 1] = ...@@ -90,6 +90,7 @@ static char *nxagentAtomNames[NXAGENT_NUMBER_OF_ATOMS + 1] =
"UTF8_STRING", /* 12 */ "UTF8_STRING", /* 12 */
"_NET_WM_STATE", /* 13 */ "_NET_WM_STATE", /* 13 */
"_NET_WM_STATE_FULLSCREEN", /* 14 */ "_NET_WM_STATE_FULLSCREEN", /* 14 */
"NX_CUT_BUFFER_CLIENT", /* 15 */
NULL, NULL,
NULL NULL
}; };
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "../../include/window.h" #include "../../include/window.h"
#include "screenint.h" #include "screenint.h"
#define NXAGENT_NUMBER_OF_ATOMS 16 #define NXAGENT_NUMBER_OF_ATOMS 17
extern Atom nxagentAtoms[NXAGENT_NUMBER_OF_ATOMS]; extern Atom nxagentAtoms[NXAGENT_NUMBER_OF_ATOMS];
......
...@@ -64,6 +64,7 @@ extern int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom select ...@@ -64,6 +64,7 @@ extern int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom select
void nxagentClearSelection(); void nxagentClearSelection();
void nxagentRequestSelection(); void nxagentRequestSelection();
void nxagentNotifySelection(); void nxagentHandleSelectionNotifyFromXServer();
int nxagentFindCurrentSelectionIndex(Atom sel);
#endif /* __Clipboard_H__ */ #endif /* __Clipboard_H__ */
...@@ -944,7 +944,7 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate) ...@@ -944,7 +944,7 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
fprintf(stderr, "nxagentDispatchEvents: Going to handle new SelectionNotify event.\n"); fprintf(stderr, "nxagentDispatchEvents: Going to handle new SelectionNotify event.\n");
#endif #endif
nxagentNotifySelection(&X); nxagentHandleSelectionNotifyFromXServer(&X);
break; break;
} }
...@@ -2933,12 +2933,7 @@ int nxagentHandleXFixesSelectionNotify(XEvent *X) ...@@ -2933,12 +2933,7 @@ int nxagentHandleXFixesSelectionNotify(XEvent *X)
if (SelectionCallback) if (SelectionCallback)
{ {
int i = 0; int i = nxagentFindCurrentSelectionIndex(local);
while ((i < NumCurrentSelections) &&
CurrentSelections[i].selection != local)
i++;
if (i < NumCurrentSelections) if (i < NumCurrentSelections)
{ {
SelectionInfoRec info; SelectionInfoRec info;
......
...@@ -691,11 +691,7 @@ ProcConvertSelection(register ClientPtr client) ...@@ -691,11 +691,7 @@ ProcConvertSelection(register ClientPtr client)
(stuff->selection == MakeAtom("CLIPBOARD", 9, 0))) && (stuff->selection == MakeAtom("CLIPBOARD", 9, 0))) &&
nxagentOption(Clipboard) != ClipboardNone) nxagentOption(Clipboard) != ClipboardNone)
{ {
int i = 0; int i = nxagentFindCurrentSelectionIndex(stuff->selection);
while ((i < NumCurrentSelections) &&
CurrentSelections[i].selection != stuff->selection) i++;
if ((i < NumCurrentSelections) && (CurrentSelections[i].window != None)) if ((i < NumCurrentSelections) && (CurrentSelections[i].window != None))
{ {
if (nxagentConvertSelection(client, pWin, stuff->selection, stuff->requestor, if (nxagentConvertSelection(client, pWin, stuff->selection, stuff->requestor,
......
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