summaryrefslogtreecommitdiff
path: root/emu
diff options
context:
space:
mode:
authorPete <pete@debu.gs>2023-11-02 10:33:09 -0700
committerPete <pete@debu.gs>2024-04-16 18:41:33 -0700
commitb4c47959cc65867cea813d3853feddddf58f2421 (patch)
treeb81ed51aed160b3b1d4d5de4f81ca377b64ee01a /emu
parent1a52b16d6bcacccb04d55cf57f963806c9ac8861 (diff)
Assume UTF-8 from the X11 clipboard.
This stops a lot of error spew from libxwhichever: almost everything's UTF-8, Plan 9 won.
Diffstat (limited to 'emu')
-rw-r--r--emu/port/win-x11a.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/emu/port/win-x11a.c b/emu/port/win-x11a.c
index bbc65761..0fc38450 100644
--- a/emu/port/win-x11a.c
+++ b/emu/port/win-x11a.c
@@ -969,7 +969,7 @@ xinitscreen(int xsize, int ysize, ulong reqchan, ulong *chan, int *d)
}
clipboard = XInternAtom(xmcon, "CLIPBOARD", False);
- utf8string = XInternAtom(xmcon, "UTF8_STRING", False);
+ utf8string = XInternAtom(xmcon, "UTF8_STRING", True);
targets = XInternAtom(xmcon, "TARGETS", False);
text = XInternAtom(xmcon, "TEXT", False);
compoundtext = XInternAtom(xmcon, "COMPOUND_TEXT", False);
@@ -1523,7 +1523,7 @@ _xgetsnarf(XDisplay *xd)
*/
prop = 1;
XChangeProperty(xd, xdrawable, prop, XA_STRING, 8, PropModeReplace, (uchar*)"", 0);
- XConvertSelection(xd, clipboard, XA_STRING, prop, xdrawable, CurrentTime);
+ XConvertSelection(xd, clipboard, utf8string, prop, xdrawable, CurrentTime);
XFlush(xd);
lastlen = 0;
for(i=0; i<10 || (lastlen!=0 && i<30); i++){