Page MenuHome

issue5528063_1_2.diff

Authored By
Sv. Lockal (lockal)
Nov 13 2013, 4:29 PM
Size
2 KB
Subscribers
None

issue5528063_1_2.diff

Index: intern/ghost/intern/GHOST_SystemX11.cpp
===================================================================
--- intern/ghost/intern/GHOST_SystemX11.cpp (revision 43260)
+++ intern/ghost/intern/GHOST_SystemX11.cpp (working copy)
@@ -767,10 +767,11 @@
case SelectionRequest:
{
XEvent nxe;
- Atom target, string, compound_text, c_string;
+ Atom target, utf8_string, string, compound_text, c_string;
XSelectionRequestEvent *xse = &xe->xselectionrequest;
target = XInternAtom(m_display, "TARGETS", False);
+ utf8_string = XInternAtom(m_display, "UTF8_STRING", False);
string = XInternAtom(m_display, "STRING", False);
compound_text = XInternAtom(m_display, "COMPOUND_TEXT", False);
c_string = XInternAtom(m_display, "C_STRING", False);
@@ -789,7 +790,7 @@
nxe.xselection.time = xse->time;
/*Check to see if the requestor is asking for String*/
- if(xse->target == string || xse->target == compound_text || xse->target == c_string) {
+ if(xse->target == utf8_string || xse->target == string || xse->target == compound_text || xse->target == c_string) {
if (xse->selection == XInternAtom(m_display, "PRIMARY", False)) {
XChangeProperty(m_display, xse->requestor, xse->property, xse->target, 8, PropModeReplace,
(unsigned char*)txt_select_buffer, strlen(txt_select_buffer));
@@ -798,13 +799,14 @@
(unsigned char*)txt_cut_buffer, strlen(txt_cut_buffer));
}
} else if (xse->target == target) {
- Atom alist[4];
+ Atom alist[5];
alist[0] = target;
- alist[1] = string;
- alist[2] = compound_text;
- alist[3] = c_string;
+ alist[1] = utf8_string;
+ alist[2] = string;
+ alist[3] = compound_text;
+ alist[4] = c_string;
XChangeProperty(m_display, xse->requestor, xse->property, xse->target, 32, PropModeReplace,
- (unsigned char*)alist, 4);
+ (unsigned char*)alist, 5);
XFlush(m_display);
} else {
//Change property to None because we do not support anything but STRING
@@ -1342,7 +1344,7 @@
GHOST_TUns8 *GHOST_SystemX11::getClipboard(bool selection) const
{
Atom sseln;
- Atom target= m_string;
+ Atom target= m_utf8_string;
Window owner;
// from xclip.c doOut() v0.11

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
28/18/5c3d5c65eb37610bf6645e895fac

Event Timeline