Commit 013a268e authored by cutealien's avatar cutealien

Merge branch releases/1.8 revisions 5145:5187 into trunk:

- Fix pasting text from X11 applications to Irrlicht. Thanks @est31 for the patch.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5188 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 70378984
......@@ -122,6 +122,7 @@ Changes in 1.9 (not yet released)
--------------------------
Changes in 1.8.4
- Fix pasting text from X11 applications to Irrlicht. Thanks @est31 for the patch.
- Tests give now a warning when stabilizing screenshots failed. Aslo trying more often now (a hack as taking screenshots otherwise fails often in windowed mode on some systems).
--------------------------
......
......@@ -2098,7 +2098,7 @@ const c8* CIrrDeviceLinux::getTextFromClipboard() const
Clipboard = "";
if (ownerWindow != None )
{
XConvertSelection (XDisplay, X_ATOM_CLIPBOARD, XA_STRING, None, ownerWindow, CurrentTime);
XConvertSelection (XDisplay, X_ATOM_CLIPBOARD, XA_STRING, XA_PRIMARY, ownerWindow, CurrentTime);
XFlush (XDisplay);
// check for data
......@@ -2107,7 +2107,7 @@ const c8* CIrrDeviceLinux::getTextFromClipboard() const
unsigned long numItems, bytesLeft, dummy;
unsigned char *data;
XGetWindowProperty (XDisplay, ownerWindow,
XA_STRING, // property name
XA_PRIMARY, // property name
0, // offset
0, // length (we only check for data, so 0)
0, // Delete 0==false
......@@ -2120,7 +2120,7 @@ const c8* CIrrDeviceLinux::getTextFromClipboard() const
if ( bytesLeft > 0 )
{
// there is some data to get
int result = XGetWindowProperty (XDisplay, ownerWindow, XA_STRING, 0,
int result = XGetWindowProperty (XDisplay, ownerWindow, XA_PRIMARY, 0,
bytesLeft, 0, AnyPropertyType, &type, &format,
&numItems, &dummy, &data);
if (result == Success)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment