Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1367591 - Gtk3 Clipboard gtk_clipboard_set_with_data does not function properly in Wayland
Summary: Gtk3 Clipboard gtk_clipboard_set_with_data does not function properly in Wayland
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: wayland
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Adam Jackson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: WaylandRelated
TreeView+ depends on / blocked
 
Reported: 2016-08-16 21:28 UTC by Norman Smith
Modified: 2017-08-08 16:34 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-08 16:34:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Test program source code. (2.23 KB, text/x-csrc)
2016-08-16 21:28 UTC, Norman Smith
no flags Details
Makefile for clip.c. (279 bytes, text/plain)
2016-08-16 21:29 UTC, Norman Smith
no flags Details

Description Norman Smith 2016-08-16 21:28:22 UTC
Created attachment 1191399 [details]
Test program source code.

Description of problem:


Version-Release number of selected component (if applicable):

ibus-wayland-1.5.13-3.fc24.x86_64
libwayland-cursor-devel-1.10.0-1.fc24.x86_64
xorg-x11-server-Xwayland-1.18.4-1.fc24.x86_64
gnome-session-wayland-session-3.20.2-1.fc24.x86_64
mesa-libwayland-egl-devel-12.0.1-1.fc24.x86_64
libwayland-server-1.10.0-1.fc24.x86_64
wayland-protocols-devel-1.4-1.fc24.noarch
libwayland-client-1.10.0-1.fc24.x86_64
libwayland-cursor-1.10.0-1.fc24.x86_64
wayland-devel-1.10.0-1.fc24.x86_64
mesa-libwayland-egl-12.0.1-1.fc24.x86_64
libwayland-client-devel-1.10.0-1.fc24.x86_64


How reproducible:

Every time.


Steps to Reproduce:

Run test application "clip", clip.c and Makefile are attached.



Actual results:


Expected results:


Additional info:

Comment 1 Norman Smith 2016-08-16 21:29:16 UTC
Created attachment 1191400 [details]
Makefile for clip.c.

Comment 2 Norman Smith 2016-08-16 21:35:33 UTC
gtk_clipboard_set_with_data does not function properly when executed GNOME on Wayland.  The attached clip.c functions properly when on GNOME.   The attacted test code using gtk_clipboard_set_with_data to set clipboard sequentially with multiple targets with one function call. A Makefile is attached for clip.c.  When running under Wayland the "get" function is not called when clipboard is pasted after the  first call.  On very rare occasions the "get" function is called after the first paste under Wayland.

Under GNOME:

$ ./clip Three Two One
Paste clipboard contents into gedit, One is displayed in gedit.
The following is output on terminal.
get One
Paste clipboard contents into gedit, Two is displayed in gedit.
The following is output on terminal.
get Two
Paste clipboard contents into gedit, Three is displayed in gedit.
The following is output on terminal.
get Three
My work is done.

Under GNOME on Wayland

$ ./clip Three Two One
Paste clipboard contents into gedit, One is displayed in gedit.
The following is output on terminal.
get One
Paste clipboard contents into gedit, One is displayed in gedit again.
No message printed on terminal.
Paste clipboard contents into gedit, One is displayed in gedit again.

Each paste continues to display One. 

And sometimes you get a Two with get Two output on the terminal.

The results are very erratic.

Comment 3 Norman Smith 2016-08-23 20:25:50 UTC
This is not a Wayland bug.  I found that some applications don't work the same in Fedora 24 Wayland compared to Fedora 24 X11.  Firefox and google-chrome work Ok but gedit does not.  Closing.

Comment 4 Olivier Fourdan 2016-08-24 08:30:44 UTC
Not sure if this really is "notabug" or simply a bug is some other component. As a rule of thumb, it's hardly ever a "Wayland" bug per se.

In Wayland as a whole, you have the Wayland protocols (XML based specifications), the Wayland library (either client or server, low-level libraries unrelated to high level user features such as clipboard management), the Wayland compositor (mutter/gnome-shell in GNOME), the toolkit (gtk+ for GNOME) and the applications.

The vast majority of "Wayland" bugs reside in either the compositor, the toolkit or the applications.

Add to this the applications that are not ported to Wayland and still run in X11 and therefore rely on Xwayland (that's the case for Firefox and google-chrome at this time of writing) and you have an additional candidate for bugs which is Xwayland.

The tricky part is to find the right component among those 4 candidates for bugs.

Comment 5 Norman Smith 2016-09-26 17:49:52 UTC
I changed the status from CLOSED to MODIFIED.  Hope this OK.

This is a bug related to Wayland.  

gtk_clipboard_set_with_data's get function is not being called when it should be called.  It is called properly the first time but should be called again after each paste.  If you change the focus from the application after each paste it is called.  That is not correct based on the way it works in X11. The following steps show the difference.

In Fedora 25 alpha login with X11.

Run test program clip.

$ ./clip Three Two One

Run gedit.

Right Click and Paste into gedit 3 times.

In gedit:

OneTwoThree

On terminal:

get One
get Two
get Three
My work is done.

The above is the expected behavior using the
gtk_clipboard_set_with_data function.

In Fedora 25 alpha login with Wayland.

$ ./clip Three Two One

Run gedit.

Right Click and Paste into gedit 3 times.

In gedit:

OneOneOne

On terminal:

get One

In Wayland the get function in the test program
was called only once and the clipboard contained
the same data for the three pastes.

In Fedora 25 alpha login with Wayland.

$ ./clip Three Two One

Run gedit.

Perform 1,2 and 3 for three pastes.

1. Right Click and Paste.
2. Change the focus from gedit to another window.
3. Change focus back to gedit.

In gedit:

OneTwoThree

On terminal:

get One
get Two
get Three
My work is done.

Something is blocking the call to the get function
until the focus is changed from the gedit window.

This test can be run using Firefox instead of gedit
with the same results.

Comment 6 Norman Smith 2016-10-21 18:24:04 UTC
gtk_clipboard_set_with_data does not function properly in Wayland in Fedora 25 Beta.

Comment 7 Fedora End Of Life 2017-07-25 22:28:52 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 8 Fedora End Of Life 2017-08-08 16:34:55 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.