Closed Bug 1647689 Opened 4 years ago Closed 4 years ago

[Wayland/Sway] Clipboard only works across Gtk apps

Categories

(Core :: Widget: Gtk, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox77 --- unaffected
firefox78 --- unaffected
firefox79 --- fixed

People

(Reporter: matias, Assigned: stransky)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(6 files)

Internal clipboard (copying and pasting within Firefox) still works.
Copying from Firefox to other apps does not work anymore.

Reverting Bug 1547595 fixes the issue.

Regressed by: 1547595
Has Regression Range: --- → yes

Actually, the only flux that is broken is copying from Firefox and pasting on Wayland-native apps. So, copying and pasting on XWayland apps works, as well as copying from Wayland-native and pasting on Firefox.

Component: General → Widget: Gtk
Product: Firefox → Core

Set release status flags based on info from the regressing bug 1547595

I can't reproduce this on Fedora/Gnome. Running in Firefox in wayland mode and copying to other wayland apps seems to work. Running firefox in X11 also works.

We are experiencing this on Arch Linux/Sway.

I have this bug on ArchLinux / Sway (1.4-9 with wlroots 0.10-1)
Tested on commits: e65c8bb7ce6c, a91e8e8cd93f, 6803dda74d33, 225cc6d94570

Reverting 372abda7c202f7e13fb48c8ae72bbae5c0922b40 fix it.

It also happens on a newly-created profile.

Again, only when copying from Firefox and pasting on Wayland-native apps (e.g, Telegram with QT_QPA_PLATFORM='wayland' and alacritty)

Can you attach a log obtained by running firefox with WAYLAND_DEBUG=1 env variable when the copy from Firefox fails?
Thanks.

Blocks: wayland-sway
Flags: needinfo?(matias)

Also it would be useful to see the log when copy works, we should see a different mime types handled there.

Attached file firefox2alacritty.txt
Attached file alacritty2firefox.txt
Attached file firefox2firefox.txt
Flags: needinfo?(matias)

I have just noticed copying from Firefox to Gtk apps works. Tom, did you only test with Gtk apps?

The issue is with non-Gtk apps, such as Qt apps, toolkit-less apps, etc.

Summary: [Wayland/Sway] Clipboard stopped working → [Wayland/Sway] Clipboard only works across Gtk apps

Great, Thanks! Can you also provide a log when the patch is reverted and the copy from Firefox works?

Pretty sure we have to add text/plain;charset=utf-8 after all. That is what alacritty -> firefox was using.

Attached file patch_reverted.txt

(In reply to Tom Schuster [:evilpie] from comment #13)

Pretty sure we have to add text/plain;charset=utf-8 after all. That is what alacritty -> firefox was using.

Let's isolate the issue first. I wonder if the alacritty pasting is also broken under mutter/gnome of if it's Sway/KDE only bug.

I wonder if the alacritty pasting is also broken under mutter/gnome of if it's Sway/KDE only bug.

Copying from gtk3-demo to alacritty works. Copying from gtk3-demo to Qt apps also works.

Assignee: nobody → stransky
Priority: -- → P2
Pushed by dluca@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/23f15d360f2b
[Linux] Use text/plain;charset=utf-8 for text mime types again due to clipboard regressions (reverts Bug 1547595), r=jhorak
https://hg.mozilla.org/integration/autoland/rev/356379eb2826
[Linux] Apply test workaround for Bug 1600182 again, r=jhorak
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79

I'm getting the same problem here with Firefox 84.0.1. May be a regression?

My setup here is a Linux Manjaro, Sway and Wayland.

As soon as I set the variable MOZ_ENABLE_WAYLAND=1 it's not possible to paste info copied from address bar.
If I don't use it, it works as expected.

Any ideas?

(In reply to Rodirgo from comment #21)

I'm getting the same problem here with Firefox 84.0.1. May be a regression?

My setup here is a Linux Manjaro, Sway and Wayland.

As soon as I set the variable MOZ_ENABLE_WAYLAND=1 it's not possible to paste info copied from address bar.
If I don't use it, it works as expected.

Any ideas?

I'm also experiencing the same issue: can't copy URLs from the address bar or from links in pages.
But if I copy them to a text field somewhere in a page or extension, and then copy from there, I can paste it in other apps. It is just direct copying links or from address bar that fails.

What happens when copying from the URL bar (not working):

[876732,105]  -> wl_data_device_manager@8.create_data_source(new id wl_data_source@70)
[876732,128]  -> wl_data_source@70.offer("UTF8_STRING")
[876732,141]  -> wl_data_source@70.offer("COMPOUND_TEXT")
[876732,150]  -> wl_data_source@70.offer("TEXT")
[876732,161]  -> wl_data_source@70.offer("STRING")
[876732,174]  -> wl_data_source@70.offer("text/plain;charset=utf-8")
[876732,189]  -> wl_data_source@70.offer("text/plain")
[876732,201]  -> wl_data_device@18.set_selection(wl_data_source@70, 32598)
[876732,230]  -> wl_data_source@70.offer("SAVE_TARGETS")
[876732,244]  -> wl_data_device@18.set_selection(wl_data_source@70, 32598)
[876732,621] wl_data_device@32.data_offer(new id wl_data_offer@1814086688)
[876732,649] wl_data_offer@4278190083.offer("UTF8_STRING")
[876732,666] wl_data_offer@4278190083.offer("COMPOUND_TEXT")
[876732,681] wl_data_offer@4278190083.offer("TEXT")
[876732,695] wl_data_offer@4278190083.offer("STRING")
[876732,711] wl_data_offer@4278190083.offer("text/plain;charset=utf-8")
[876732,722] wl_data_offer@4278190083.offer("text/plain")
[876732,733] wl_data_device@32.selection(wl_data_offer@4278190083)
[876732,751]  -> wl_data_offer@4278190080.destroy()
[876732,766] wl_data_device@18.data_offer(new id wl_data_offer@1814086208)
[876732,785] wl_data_offer@4278190084.offer("UTF8_STRING")
[876732,796] wl_data_offer@4278190084.offer("COMPOUND_TEXT")
[876732,804] wl_data_offer@4278190084.offer("TEXT")
[876732,815] wl_data_offer@4278190084.offer("STRING")
[876732,826] wl_data_offer@4278190084.offer("text/plain;charset=utf-8")
[876732,840] wl_data_offer@4278190084.offer("text/plain")
[876732,852] wl_data_device@18.selection(wl_data_offer@4278190084)
[876732,865]  -> wl_data_offer@4278190081.destroy()

What happens when copying text from a page (working):

[944813,330]  -> wl_data_device_manager@8.create_data_source(new id wl_data_source@70)
[944813,370]  -> wl_data_source@70.offer("text/html")
[944813,383]  -> wl_data_source@70.offer("text/_moz_htmlcontext")
[944813,395]  -> wl_data_source@70.offer("text/_moz_htmlinfo")
[944813,418]  -> wl_data_source@70.offer("UTF8_STRING")
[944813,452]  -> wl_data_source@70.offer("COMPOUND_TEXT")
[944813,476]  -> wl_data_source@70.offer("TEXT")
[944813,499]  -> wl_data_source@70.offer("STRING")
[944813,523]  -> wl_data_source@70.offer("text/plain;charset=utf-8")
[944813,546]  -> wl_data_source@70.offer("text/plain")
[944813,569]  -> wl_data_source@70.offer("text/x-moz-url-priv")
[944813,594]  -> wl_data_device@18.set_selection(wl_data_source@70, 32694)
[944813,634]  -> wl_data_source@70.offer("SAVE_TARGETS")
[944813,660]  -> wl_data_device@18.set_selection(wl_data_source@70, 32694)
[944814,086] wl_data_device@32.data_offer(new id wl_data_offer@1814086768)
[944814,129] wl_data_offer@4278190082.offer("text/html")
[944814,153] wl_data_offer@4278190082.offer("text/_moz_htmlcontext")
[944814,178] wl_data_offer@4278190082.offer("text/_moz_htmlinfo")
[944814,199] wl_data_offer@4278190082.offer("UTF8_STRING")
[944814,222] wl_data_offer@4278190082.offer("COMPOUND_TEXT")
[944814,244] wl_data_offer@4278190082.offer("TEXT")
[944814,265] wl_data_offer@4278190082.offer("STRING")
[944814,287] wl_data_offer@4278190082.offer("text/plain;charset=utf-8")
[944814,311] wl_data_offer@4278190082.offer("text/plain")
[944814,334] wl_data_offer@4278190082.offer("text/x-moz-url-priv")
[944814,356] wl_data_device@32.selection(wl_data_offer@4278190082)
[944814,379]  -> wl_data_offer@4278190081.destroy()
[944814,402] wl_data_device@18.data_offer(new id wl_data_offer@1814088368)
[944814,432] wl_data_offer@4278190084.offer("text/html")
[944814,457] wl_data_offer@4278190084.offer("text/_moz_htmlcontext")
[944814,481] wl_data_offer@4278190084.offer("text/_moz_htmlinfo")
[944814,504] wl_data_offer@4278190084.offer("UTF8_STRING")
[944814,526] wl_data_offer@4278190084.offer("COMPOUND_TEXT")
[944814,548] wl_data_offer@4278190084.offer("TEXT")
[944814,572] wl_data_offer@4278190084.offer("STRING")
[944814,594] wl_data_offer@4278190084.offer("text/plain;charset=utf-8")
[944814,618] wl_data_offer@4278190084.offer("text/plain")
[944814,640] wl_data_offer@4278190084.offer("text/x-moz-url-priv")
[944814,663] wl_data_device@18.selection(wl_data_offer@4278190084)
[944814,688]  -> wl_data_offer@4278190080.destroy()

This is an issue with FF 93.0 in Flatpak on Sway.

Copying from web pages works, but not from the URL bar. Also, primary selection doesn't work at all.

It seems like the new bug for the URL not working is https://bugzilla.mozilla.org/show_bug.cgi?id=1717305

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

Attachment

General

Creator:
Created:
Updated:
Size: