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