ref: fad4eb92fbe9bed64060b1b7958d953c6ed67267
parent: 8406d23041c63f3f546fb3aa08ecaf3ece8c7ade
author: sl <devnull@localhost>
date: Wed Apr 6 13:18:03 EDT 2016
gui-x11/x11.c: fix [thing] (thanks, k0ga)
--- a/gui-x11/x11.c
+++ b/gui-x11/x11.c
@@ -1062,7 +1062,7 @@
_xgetsnarf(XDisplay *xd)
{
uchar *data, *xdata;
- Atom clipboard, type, prop;
+ Atom selection, type, prop;
unsigned long lastlen;
unsigned long dummy, len;
int fmt, i;
@@ -1078,7 +1078,7 @@
/*
* Is there a primary selection (highlighted text in an xterm)?
*/
- clipboard = XA_PRIMARY;
+ selection = XA_PRIMARY;
w = XGetSelectionOwner(xd, XA_PRIMARY);
if(w == xdrawable){
mine:
@@ -1089,9 +1089,9 @@
/*
* If not, is there a clipboard selection?
*/
- if(w == None && clipboard != None){
- clipboard = clipboard;
- w = XGetSelectionOwner(xd, clipboard);
+ if(w == None && selection != None){
+ selection = clipboard;
+ w = XGetSelectionOwner(xd, selection);
if(w == xdrawable)
goto mine;
}
@@ -1112,7 +1112,7 @@
*/
prop = 1;
XChangeProperty(xd, xdrawable, prop, utf8string, 8, PropModeReplace, (uchar*)"", 0);
- XConvertSelection(xd, clipboard, utf8string, prop, xdrawable, CurrentTime);
+ XConvertSelection(xd, selection, utf8string, prop, xdrawable, CurrentTime);
XFlush(xd);
lastlen = 0;
for(i=0; i<10 || (lastlen!=0 && i<30); i++){