mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +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;
|
||||
Xwin *w;
|
||||
|
||||
qlock(&clip.lk);
|
||||
xlock();
|
||||
qlock(&clip.lk);
|
||||
w = _x.windows;
|
||||
/*
|
||||
* Have we snarfed recently and the X server hasn't caught up?
|
||||
|
@ -1540,8 +1540,8 @@ rpc_getsnarf(void)
|
|||
}
|
||||
|
||||
out:
|
||||
xunlock();
|
||||
qunlock(&clip.lk);
|
||||
xunlock();
|
||||
return (char*)data;
|
||||
}
|
||||
|
||||
|
@ -1553,8 +1553,8 @@ __xputsnarf(char *data)
|
|||
|
||||
if(strlen(data) >= SnarfSize)
|
||||
return;
|
||||
qlock(&clip.lk);
|
||||
xlock();
|
||||
qlock(&clip.lk);
|
||||
w = _x.windows;
|
||||
strcpy(clip.buf, data);
|
||||
/* leave note for mouse proc to assert selection ownership */
|
||||
|
@ -1568,8 +1568,8 @@ __xputsnarf(char *data)
|
|||
e.button = ~0;
|
||||
XSendEvent(_x.display, w->drawable, True, ButtonPressMask, (XEvent*)&e);
|
||||
XFlush(_x.display);
|
||||
xunlock();
|
||||
qunlock(&clip.lk);
|
||||
xunlock();
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Reference in a new issue