Closed Saviq closed 1 year ago
Just for confirmation: this is the lack of "primary select" (select & paste), which we don't implement for security reasons?
I.e. not a problem with copy and paste?
No, this is actual copy paste, as in Ctrl+C / Ctrl+V. Fixed the steps.
It must be related to the copy mime type or so. I now found that if I right-click a link in Thunderbird and "copy link", I can't paste that either. If I select the link and just Ctrl+C that, it works.
related to the copy mime type or so
That would be weird: Mir only sees that as a string to pass on
Probably related to this: I've found that in CLion cut & paste only works up to the last \n
in the source text. Also seen pasting from CLion into Firefox. (I.e. cut & paste a few words fails, cut & paste several lines drops the last line unless I carefully select the EOL.)
Are all of these issues involving at least one XWayland app? Copy/paste code paths for Wayland/XWayland are very different, so that's likely relevant.
Are all of these issues involving at least one XWayland app
No, cutting from Firefox address bar and pasting into Gnome Console doesn't work
I noticed something interesting on Miriway. When I:
I can paste the URL into Gnome Terminal and Gedit. Once I try to repeat this in the same Miriway session, I am no longer able to copy the link. Closing the Miriway session and restarting it allows for one copy to happen.
EDIT: This behavior is repeatable using the Firefox snap. When running Firefox installed from Mozilla's apt repository, I cannot even copy a link properly once.
I can paste the URL into Gnome Terminal and Gedit. Once I try to repeat this in the same Miriway session, I am no longer able to copy the link. Closing the Miriway session and restarting it allows for one copy to happen.
FWIW I can't even paste the once.
Firefox is successfully copy/pasting again after disabling the call to multiplexer.paste_source_set(nullptr)
in ms::BasicClipboard::clear_paste_source(ClipboardSource const& source)
.
I'm not too sure of the inner workings of all of this, but it seems like something @wmww is familiar with.
EDIT: I was accidentally running Firefox on XWayland.
@graysonguarino that had no effect for me running Firefox on Wayland. It sounded like you're running Firefox on XWayland, which is likely a different issue.
Notably, I just discovered that copy/paste from address bar in FF on Wayland is also broken under Weston. Perhaps FFs logic relies on primary selection or some other protocol Mir and Weston don't support but Sway and Mir do?
Bug reported to Mozilla https://bugzilla.mozilla.org/show_bug.cgi?id=1791417
I have confirmed that adding and enabling a stubbed out implementation of the primary selection protocol fixes the problem.
I've added that info to the FF bug, you can see it working on this branch
Steps: