From 8f8c52939e19ac3da43aa72e782ec69a6c85cdde Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Thu, 14 Feb 2013 18:40:04 +0000 Subject: Fixes STR#2930: Applying Chris's patch to fix d+d of text selections from Firefox/Thunderbird -> FLTK. Also applied Greg's fix for d+d of utf8 text in same use case. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9824 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_x.cxx | 54 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 44380e5a1..17a65fb3c 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -319,6 +319,7 @@ Atom fl_XdndFinished; //Atom fl_XdndProxy; Atom fl_XdndURIList; Atom fl_Xatextplainutf; +Atom fl_Xatextplainutf2; // STR#2930 Atom fl_Xatextplain; static Atom fl_XaText; Atom fl_XaCompoundText; @@ -621,6 +622,7 @@ void fl_open_display(Display* d) { fl_XdndEnter = XInternAtom(d, "XdndEnter", 0); fl_XdndURIList = XInternAtom(d, "text/uri-list", 0); fl_Xatextplainutf = XInternAtom(d, "text/plain;charset=UTF-8",0); + fl_Xatextplainutf2 = XInternAtom(d, "text/plain;charset=utf-8",0); // Firefox/Thunderbird needs this - See STR#2930 fl_Xatextplain = XInternAtom(d, "text/plain", 0); fl_XaText = XInternAtom(d, "TEXT", 0); fl_XaCompoundText = XInternAtom(d, "COMPOUND_TEXT", 0); @@ -1023,13 +1025,17 @@ int fl_handle(const XEvent& thisevent) Atom type = XA_STRING; for (unsigned i = 0; i