mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-27 11:52:03 +00:00
swap the order of X11 and clipboard locks (#4)
This commit is contained in:
parent
21ff7e50fd
commit
faa533e2e5
1 changed files with 4 additions and 4 deletions
|
@ -1495,8 +1495,8 @@ rpc_getsnarf(void)
|
||||||
XWindow xw;
|
XWindow xw;
|
||||||
Xwin *w;
|
Xwin *w;
|
||||||
|
|
||||||
qlock(&clip.lk);
|
|
||||||
xlock();
|
xlock();
|
||||||
|
qlock(&clip.lk);
|
||||||
w = _x.windows;
|
w = _x.windows;
|
||||||
/*
|
/*
|
||||||
* Have we snarfed recently and the X server hasn't caught up?
|
* Have we snarfed recently and the X server hasn't caught up?
|
||||||
|
@ -1540,8 +1540,8 @@ rpc_getsnarf(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
xunlock();
|
|
||||||
qunlock(&clip.lk);
|
qunlock(&clip.lk);
|
||||||
|
xunlock();
|
||||||
return (char*)data;
|
return (char*)data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1553,8 +1553,8 @@ __xputsnarf(char *data)
|
||||||
|
|
||||||
if(strlen(data) >= SnarfSize)
|
if(strlen(data) >= SnarfSize)
|
||||||
return;
|
return;
|
||||||
qlock(&clip.lk);
|
|
||||||
xlock();
|
xlock();
|
||||||
|
qlock(&clip.lk);
|
||||||
w = _x.windows;
|
w = _x.windows;
|
||||||
strcpy(clip.buf, data);
|
strcpy(clip.buf, data);
|
||||||
/* leave note for mouse proc to assert selection ownership */
|
/* leave note for mouse proc to assert selection ownership */
|
||||||
|
@ -1568,8 +1568,8 @@ __xputsnarf(char *data)
|
||||||
e.button = ~0;
|
e.button = ~0;
|
||||||
XSendEvent(_x.display, w->drawable, True, ButtonPressMask, (XEvent*)&e);
|
XSendEvent(_x.display, w->drawable, True, ButtonPressMask, (XEvent*)&e);
|
||||||
XFlush(_x.display);
|
XFlush(_x.display);
|
||||||
xunlock();
|
|
||||||
qunlock(&clip.lk);
|
qunlock(&clip.lk);
|
||||||
|
xunlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
Loading…
Reference in a new issue