Bug 20326 - Linux mono clipboard is uncompatible with gtk_clipboard_wait_for_targets()
Summary: Linux mono clipboard is uncompatible with gtk_clipboard_wait_for_targets()
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: Windows.Forms ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: Community
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-06-03 23:47 UTC by pkotwicz
Modified: 2017-09-01 11:56 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Contains mono_app.cs and gtk_app.c (3.53 KB, application/zip)
2014-06-03 23:47 UTC, pkotwicz
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 20326 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description pkotwicz 2014-06-03 23:47:48 UTC
Created attachment 6974 [details]
Contains mono_app.cs and gtk_app.c

Repro steps:
1) Run a mono app which puts data on the clipboard on Linux (e.g. mono_app.cs)
2) Run a GTK app which reads the data types which are on the clipboard via gtk_clipboard_wait_for_types() (e.g. gtk_app.c)

Expected:
The GTK app should be able to get the data types which are on the clipboard. gtk_app should print a number > 0
Actual:
The GTK app cannot get the data types which are on the clipboard. gtk_app prints -1

The bug is that GTK expects that the X11 call
XConvertSelection(display, selection, XInternAtom(display, "TARGETS", false), property, requestor, time)
sets |property| to a property of type XA_ATOM.
mono seems to set |property| to a property of type XInternAtom(display, "TARGETS", false)

Based on reading http://tronche.com/gui/x/icccm/sec-2.html#s-2 this looks like a bug in mono as opposed to a bug in GTK.

Compiling:
mono_app.cs -> "mcs mono_app.cs"
gtk_app.c -> gcc `pkg-config gtk+-2.0 --cflags` gtk_app.c -o gtk_app `pkg-config gtk+-2.0 --libs`
Comment 1 scwalla 2016-05-17 00:38:07 UTC
This bug keeps me from being able to copy from KeePass to Firefox and other GTK apps.