diff options
author | Friedrich von Never <friedrich@fornever.me> | 2019-04-28 18:16:09 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2019-05-02 15:23:02 +0300 |
commit | c9c50f85f4ea7368b1aeaaed27564fcf6a1a3609 (patch) | |
tree | ede73f7050f4807931c668f23482de392da12500 /mcs/class/System.Windows.Forms | |
parent | ea917ba76abcfdc7efaf5d4fc4570d67b7c836b1 (diff) |
Fix #14255: correct type and bitness for TARGETS request of X11 clipboard
Diffstat (limited to 'mcs/class/System.Windows.Forms')
-rw-r--r-- | mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs index 3425af7c4a8..8b90abdd4c2 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs @@ -1808,27 +1808,27 @@ namespace System.Windows.Forms { // Seems that some apps support asking for supported types if (format_atom == TARGETS) { - int[] atoms; + IntPtr[] atoms; int atom_count; - atoms = new int[5]; + atoms = new IntPtr[5]; atom_count = 0; if (Clipboard.IsSourceText) { - atoms[atom_count++] = (int)Atom.XA_STRING; - atoms[atom_count++] = (int)OEMTEXT; - atoms[atom_count++] = (int)UTF8_STRING; - atoms[atom_count++] = (int)UTF16_STRING; - atoms[atom_count++] = (int)RICHTEXTFORMAT; + atoms[atom_count++] = (IntPtr)Atom.XA_STRING; + atoms[atom_count++] = (IntPtr)OEMTEXT; + atoms[atom_count++] = (IntPtr)UTF8_STRING; + atoms[atom_count++] = (IntPtr)UTF16_STRING; + atoms[atom_count++] = (IntPtr)RICHTEXTFORMAT; } else if (Clipboard.IsSourceImage) { - atoms[atom_count++] = (int)Atom.XA_PIXMAP; - atoms[atom_count++] = (int)Atom.XA_BITMAP; + atoms[atom_count++] = (IntPtr)Atom.XA_PIXMAP; + atoms[atom_count++] = (IntPtr)Atom.XA_BITMAP; } else { // FIXME - handle other types } XChangeProperty(DisplayHandle, xevent.SelectionRequestEvent.requestor, (IntPtr)xevent.SelectionRequestEvent.property, - (IntPtr)xevent.SelectionRequestEvent.target, 32, PropertyMode.Replace, atoms, atom_count); + (IntPtr)Atom.XA_ATOM, 32, PropertyMode.Replace, atoms, atom_count); sel_event.SelectionEvent.property = xevent.SelectionRequestEvent.property; } else if (format_atom == (IntPtr)RICHTEXTFORMAT) { string rtf_text = Clipboard.GetRtfText (); |