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 1214655 - In Gnome Wayland, marking text with the mouse doesn’t put it into the cut buffer, only Control-C (Or Shift-Control-C in gnome-terminal) does
Summary: In Gnome Wayland, marking text with the mouse doesn’t put it into the cut buf...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: wayland
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Adam Jackson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1288525 (view as bug list)
Depends On:
Blocks: WaylandRelated
TreeView+ depends on / blocked
 
Reported: 2015-04-23 10:05 UTC by Mike FABIAN
Modified: 2018-02-12 07:28 UTC (History)
50 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-21 15:00:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Mike FABIAN 2015-04-23 10:05:29 UTC
Fedora 22 Beta installed using qemu like this:

nice ionice -c 3 qemu-kvm -machine pc-1.3 -enable-kvm -global qxl.ram_size=1x1024 -m 2048M -smp 2 -drive file=./Fedora-Live-Workstation-x86_64-22_Beta-3.iso.qcow2,index=0,media=disk,cache=unsafe -localtime -serial file:/tmp/qemu-Fedora-Live-Workstation-x86_64-22_Beta-3.iso.qcow2-output.log -name Fedora-Live-Workstation-x86_64-22_Beta-3.iso.qcow2 -cdrom /local/mfabian/iso/f22-Beta-RC3/Fedora-Live-Workstation-x86_64-22_Beta-3.iso -boot c -spice port=6000,disable-ticketing,streaming-video=off -vga qxl -display vnc=:4 -net nic -net user,hostname=Fedora-Live-Workstation-x86_64-22_Beta-3.iso.qcow2,hostfwd=tcp::5560-:22 -monitor stdio -usb

I then installed all current updates with

    “sudo dnf update”

Then logged into Gnome Wayland.

When marking a text with the mouse, it is not yet in the cut&paste
buffer, pasting with the middle mouse button does not yet work.

But when typing Control-c (Shift-Control-c in gnome-terminal) after
marking text with the mouse, it is in the cut&paste buffer and can be
pasted with the middle mouse button (or Control-v (Shift-Control-v in
Gnome-terminal). Same behaviour in gnome-terminal, gedit and
apparently all other Gnome stuff.

In the non-Wayland Gnome session, marking the text with the mouse
is enough to put it in the cut&paste buffer and then paste it with
the middle mouse button.

Comment 1 Mike FABIAN 2015-04-23 10:20:54 UTC
(In reply to Mike FABIAN from comment #0)

> When marking a text with the mouse, it is not yet in the cut&paste
> buffer, pasting with the middle mouse button does not yet work.
> 
> But when typing Control-c (Shift-Control-c in gnome-terminal) after
> marking text with the mouse, it is in the cut&paste buffer and can be
> pasted with the middle mouse button (or Control-v (Shift-Control-v in
> Gnome-terminal). Same behaviour in gnome-terminal, gedit and
> apparently all other Gnome stuff.

But between firefox (uses gtk2) and xterm, I can cut&paste text just by
marking with the mouse and then pasting with the middle mouse button,
no Control-c is needed.

Comment 2 fujiwara 2015-04-24 06:59:46 UTC
Maybe UTF8_STRING selection and COMPOUND_TEXT selection do not work.

Comment 3 Mike FABIAN 2015-05-27 08:58:29 UTC
Still happens unchanged on Fedora 22 final
(tested on Fedora-Live-Workstation-x86_64-22-3.iso)

Comment 4 Mike FABIAN 2015-05-27 12:19:43 UTC
On the final Fedora 22 release, it seems even worse:
Pasting from gedit into gnome-terminal works, but pasting from gnome-terminal
into gedit does not really work: Sometimes the pasted text appears with 30 seconds
delay in gedit, sometimes not at all.

Comment 5 djip007 2015-05-29 01:08:56 UTC
on Fedora22 final...
copy-paste from gedit to firefox work on normal Gnome but not on wayland for me

And many other case... I'll say from wayland/gnome(?) application to or from other application

Comment 6 Mike FABIAN 2015-05-29 06:08:41 UTC
(In reply to djip007 from comment #5)
> on Fedora22 final...
> copy-paste from gedit to firefox work on normal Gnome but not on wayland for
> me
> 
> And many other case... I'll say from wayland/gnome(?) application to or from
> other application

Yes, I reported that as another bug:

https://bugzilla.redhat.com/show_bug.cgi?id=1214702

Comment 7 Matthias Clasen 2015-05-29 22:27:52 UTC
Wayland does not have a primary selection (what you call a 'cut buffer'). It just has a clipboard. So: C-c, C-v is supposed to work in Wayland, middle-click isn't.

Comment 8 djip007 2015-05-29 22:57:42 UTC
(In reply to Matthias Clasen from comment #7)
> Wayland does not have a primary selection (what you call a 'cut buffer'). It
> just has a clipboard. So: C-c, C-v is supposed to work in Wayland,
> middle-click isn't.

what I and  Mike FABIAN report is using C-c et C-v not working...

look like the clipboard is not the share from Wayland and x11...

Comment 9 Mike FABIAN 2015-05-30 08:50:22 UTC
(In reply to djip007 from comment #8)
> (In reply to Matthias Clasen from comment #7)
> > Wayland does not have a primary selection (what you call a 'cut buffer'). It
> > just has a clipboard. So: C-c, C-v is supposed to work in Wayland,
> > middle-click isn't.
> 
> what I and  Mike FABIAN report is using C-c et C-v not working...

Between Gnome/Wayland programs it is sometimes working, sometimes not,
see comment#4 which describes problems pasting from gnome-terminal to gedit.
 
> look like the clipboard is not the share from Wayland and x11...

Between Gnome/Wayland and X11/Gtk2 programs it never works, that is bug:

https://bugzilla.redhat.com/show_bug.cgi?id=1214702

Comment 10 Mike FABIAN 2015-05-30 08:51:10 UTC
(In reply to Matthias Clasen from comment #7)
> Wayland does not have a primary selection (what you call a 'cut buffer'). It
> just has a clipboard. So: C-c, C-v is supposed to work in Wayland,
> middle-click isn't.

Wouldn’t it be possible to make the clipboard work not only with C-c, C-v but
also with the mouse?

Comment 11 Tito Santana 2015-09-13 05:29:17 UTC
I tried it myself and both using the mouse and crtl+c on Firefox AND then shift+ctrl+v on Gnome Terminal does NOT work. 

On the other hand copying a pasting from Gedit to Gnome Terminal does work.

But you can't copy from Firefox to gedit.

Comment 12 Olivier Fourdan 2015-10-30 09:23:39 UTC
(In reply to Mike FABIAN from comment #10)
> Wouldn’t it be possible to make the clipboard work not only with C-c, C-v but
> also with the mouse?

That would cause the clipboard content to be replaced any time someone selects any text without even explicitly invoking a copy, that'd be quite confusing to most users imho.

Comment 13 Mike FABIAN 2015-11-01 02:33:23 UTC
(In reply to Olivier Fourdan from comment #12)
> (In reply to Mike FABIAN from comment #10)
> > Wouldn’t it be possible to make the clipboard work not only with C-c, C-v but
> > also with the mouse?
> 
> That would cause the clipboard content to be replaced any time someone
> selects any text without even explicitly invoking a copy, that'd be quite
> confusing to most users imho.

Not confusing at all. It worked like that on Linux for ages.

Comment 14 Olivier Fourdan 2015-11-02 08:11:25 UTC
(In reply to Mike FABIAN from comment #13)
> Not confusing at all. It worked like that on Linux for ages.

No, it's not so simple unfortunately, on X11 (Linux has nothing to do with this) you have multiple clipboards, "primary", "secondary" and "clipboard" so just selecting with the left mouse button will not override nor clear your clipboard buffer - That's two different buffers.

See jwz's description here for a description on how this works: https://www.jwz.org/doc/x-cut-and-paste.html

On Wayland, for now, there is only one buffer, so if you override its content whenever you select something, it will be utterly confusing and will not be the same as what you have now on X11, this is what I was trying to explain in my comment 12.

Either we'd need to add a new separate buffer in Wayland to be able to do the same as X11, or we'd need to come up with a slightly different approach to copy the selection to the buffer (but then it wouldn't be the exact same thing as X11 (but do we really want Wayland to be exactly the same as X11?).

Comment 15 Stefan Assmann 2015-11-02 09:46:09 UTC
(In reply to Olivier Fourdan from comment #14)
> On Wayland, for now, there is only one buffer, so if you override its
> content whenever you select something, it will be utterly confusing and will
> not be the same as what you have now on X11, this is what I was trying to
> explain in my comment 12.

How about adding an option to Wayland that would allow to override the buffer whenever you select/mark something with the mouse. It could be disabled by default but that way it can be enable by people that explicitly like this behaviour. No harm done to everyone else.
 
> Either we'd need to add a new separate buffer in Wayland to be able to do
> the same as X11, or we'd need to come up with a slightly different approach
> to copy the selection to the buffer (but then it wouldn't be the exact same
> thing as X11 (but do we really want Wayland to be exactly the same as X11?).

No, please don't add another buffer. All the different buffers made X11 behaviour very confusing. Instead let people configure how they want their copy/paste buffer to behave.
I don't think there is "the solution" to the problem but giving people the possibility to configure their environment and start-out with a basic (sane) configuration for most users sounds like a good way to me.

Thanks for considering!

Comment 16 Matthias Clasen 2015-11-02 14:01:00 UTC
(In reply to Stefan Assmann from comment #15)
>

> No, please don't add another buffer. All the different buffers made X11
> behaviour very confusing. Instead let people configure how they want their
> copy/paste buffer to behave.
> I don't think there is "the solution" to the problem but giving people the
> possibility to configure their environment and start-out with a basic (sane)
> configuration for most users sounds like a good way to me.

"Let people configure it" is almost never the right solution.

Comment 17 Stefan Assmann 2015-11-02 14:35:56 UTC
(In reply to Matthias Clasen from comment #16)

> "Let people configure it" is almost never the right solution.

Actually that's not what I said. Provide a good config for everybody but give people the opportunity to customize it to their specific needs.

Comment 18 Giovanni Pelosi 2015-11-06 11:31:55 UTC
well,

i you have to execute a tons of commands taken from a text file 
ot executin some web-based tutorial

just select it and middle-click

if you want to review before execution do not select eol, otherwise
select a middle-click run it


Having to rely on clipboard for this is just M$-Windows way of doing things.

Next step would be replace bash with CMD.EXE 


Strongly disagree

I'll remain with X until FIXED

Comment 19 Giovanni Pelosi 2015-11-06 14:38:57 UTC
ok 

Keep calm 

It's a bug, 
not a feature!

X PRIMARY works outside Gnome/GTK3

Without Wayland, Gnome/GTK3 support middle-click selection paste 

There is e "Gnome-Tweak" to enable "legacy" middle-paste
it works without interfering with clipboard, as usual

It look like a Wayland/GTK3 integration issue

(the were some strange new in the past about 
Gnome/Wayland removing support for X-SELECTION

I do not know internals, 
maybe X-SELECTION is supported only in X compatilibity layer
or it is "just" a bug.

I hope for the second choice.


In LibreOffice 5.0.3.2- Arch Linux it works but maybe it is because now is running under GTK2 not GTK3

Comment 20 Giovanni Pelosi 2015-11-06 14:49:13 UTC
> "Let people configure it" is almost never the right solution.

Exactly the same as "Sloppy-Focus/Click-to-Focus"

In fact, X selection "requires" sloppy-focus ...

Comment 21 Giovanni Pelosi 2015-11-11 09:10:27 UTC
NO Hope?

XWayland only

so xterm/terminator instead of gnome-terminal
Emacs forever! 

Problems will start when firefox will switch to gtk3

https://bugzilla.mozilla.org/show_bug.cgi?id=627699

LibreOffice too (now still in gtk2)



X-SELECTION is "eco-sustainable", CLIPBOARD is NOT (How many CO2 caused ?)

X-SELECTION do not harm your hands, CLIPBOARD cause damages (carpal tunnel syndrome)

What about "Accessibility" ?

Not as default, but as a "hidden>" option (like Caps Locks re-mapping)

Comment 22 Corinna Vinschen 2015-11-11 09:40:51 UTC
Lots of people with a long Unix/Linux history under X are using
cut/paste via mouse selection/middle mouse click for ages.  Personally
I'm used to this feature for at least 15 years.  If you remove this -
very essential - feature, you're going to cripple productivity of a
lot of people for no good reason.  It would be definitely a reason to
ignore Wayland and to stay on X as long as possible.

From my POV this feature needs to be retained to make Wayland usable.
I fully agree with Mike, Stefan and Giovanni.  Let people decide how
to use this by themselves, please, and don't kill old, and thus *used*
X11 features just because they seem to be "old".

One copy/paste buffer is enough, though.  Either people use the copy
mouse selection feature or not.  If they do, they know what they are
doing.  Really.


Corinna

Comment 23 Dominique Martinet 2015-11-12 12:27:00 UTC
Also is there an API in wayland to 'hook' on when the clipboard buffer changes ?

There are many "clipboard managers" for X that I find quite handy, along with mouse selection (they're sometimes a bit kludgy trying to synchronise all the different buffs though, but we won't have the problem with a single buffer and I definitely think we need to keep that way)

Said clipboard managers could allow for easy configuration of use mouse selection copy or not, too.

Comment 24 Ray Strode [halfline] 2015-11-12 15:00:17 UTC
middle-click paste initiative here: https://wiki.gnome.org/Initiatives/Wayland/PrimarySelection

Comment 25 Lars Nielsen 2015-11-16 19:19:07 UTC
Please consider this a bug - I think this is a deal breaker for any long time Unix user.

Comment 26 Steven Gruspier 2015-11-17 04:20:12 UTC
Should I make another bug report for Fedora 23, or should this report be updated to version 23?

Comment 27 mchalupa 2015-12-07 09:50:32 UTC
*** Bug 1288525 has been marked as a duplicate of this bug. ***

Comment 28 Jan Vlug 2015-12-27 21:38:00 UTC
Duplicate of bug 1214318?

Comment 29 lejeczek 2015-12-27 23:48:32 UTC
it's dumb, stupid... every laptop I buy I make sure it has a track point and tree-buttons pad. I can only wonder what hardware dev guys themselves use.
New Gnome is so smart, resizing, moving windows with a KEY + buttons. Scrolling contents with mid-button + track point even without switching(moving focus) to the window, including gnome-terminal - all this still works in Wayland, only that select-copy-paste mid-button got wasted... why??... ough..

Comment 30 Jiri Prajzner 2016-01-11 15:01:05 UTC
Please fix this bug. The primary selection is very useful.

Comment 31 Matthew Miller 2016-02-24 16:57:54 UTC
Note that this feature — called "primary selection" — is a blocker for shipping Wayland as default in Fedora Workstation. See https://fedoraproject.org/wiki/Wayland_features for details and progress.

Comment 32 lejeczek 2016-04-02 12:36:23 UTC
superb! many! thanks, to me is seems feature is back in F24. hurrah!

Comment 33 Steven Gruspier 2016-08-12 23:35:35 UTC
Works in fedora 24

Comment 34 Jiri Prajzner 2016-08-15 08:20:34 UTC
awesome! thanks a lot for putting it back in :)

Comment 35 Kamil Páral 2016-08-15 08:27:36 UTC
Closing per comment 33.

Comment 36 Levente Farkas 2017-02-21 11:54:49 UTC
if you're using terminator with wayland then the middle mouse paste still not working in f25 while working when disable wayland.

Comment 37 Olivier Fourdan 2017-02-21 12:19:42 UTC
(In reply to Levente Farkas from comment #36)
> if you're using terminator with wayland then the middle mouse paste still
> not working in f25 while working when disable wayland.

Could be a terminator specific issue, bug 1404432


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