Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A possible bug: Cannot copy/paste to/from KDE Applications to Eclipse in Wayland session (qt_wayland_clipboard_fix) #851

Closed
the-snowwhite opened this issue Nov 3, 2023 · 15 comments

Comments

@the-snowwhite
Copy link
Contributor

          Closing as this has been fixed in latest gtk3 and changing swt gtk3 clipboard implementation has to potential to destabilize things and gtk4 port has it working with the new approach already.

Originally posted by @akurtakov in #421 (comment)

@akurtakov
Copy link
Member

Interesting. I have tried coping from Eclipse to Kate (both running under wayland) and it worked but kate to eclipse didn't.

@the-snowwhite
Copy link
Contributor Author

@akurtakov Yes thanks that is exactly my point.
I'm running kde neon where it is not possible to copy either way between kate and eclipse in a wayland session.
So I recompiled the newest gtk version: 3.24.38 (from mantic) and installed.
That made it possible to copy from eclipse to kate, but not the other way.

@the-snowwhite
Copy link
Contributor Author

I have also just tested Kubuntu 22.10 and Fedora KDE Plasma Desktop 38, same issue.

@akurtakov
Copy link
Member

I would not have time to look into this one any time soon so we need someone to step up and work on a fix.

@the-snowwhite
Copy link
Contributor Author

OK ... I'm not experienced with eclipse code so I do not know what more I can do right now.
Thanks for acknowledging the Issue :-)

@the-snowwhite
Copy link
Contributor Author

Inspired by a comment in this thread I figured out a small workaround:
install the wl-clipboard package and the run this command before pasting to eclipse:

wl-paste -n -t text/plain | wl-copy -t STRING

@the-snowwhite
Copy link
Contributor Author

In hope of the KDE-Team being able to provide a wayland lecgacy solution like Gnome-gtk I have opened a bug repport there:
https://bugs.kde.org/show_bug.cgi?id=476522

@mickaelistria
Copy link
Contributor

Thanks for the report, this comment helps "the issue essentially boils down to Eclipse not supporting Wayland clipboard content types (RFC-1341 types).". Do you think you can help with that?

the-snowwhite added a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 7, 2023
enables paste from KDE/QT apps in a wayland session.
the-snowwhite added a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 7, 2023
enables paste from KDE/QT apps in a wayland session.
@the-snowwhite
Copy link
Contributor Author

@mickaelistria Testing out my bugfix is now completed with success
#858
The initial test commit is currently residing in this branch: (dont know if It would be possible to backport the fix)

master...the-snowwhite:eclipse.platform.swt:wayland_qt_paste_fix_R4.29

The initial commit for master is here:

https://github.com/eclipse-platform/eclipse.platform.swt/compare/master...the-snowwhite:eclipse.platform.swt:wayland_qt_paste_fix?expand=1

What I found out in all my testing is that It does exactly what promised:
running in both gtk v3.24.33 and gtk v3.24.38 it is possible to paste into eclipse from all applications that only present
RFC-1341 types (so far only text/plain;charset=utf-8) in the clipboard under a wayland session.
I have also just tested pasting the danish special characters åæø and that went fine also.
...
Lastly I looked into if I would be able to get the copy to wayland clipboard functionality to work under gtk v3.24.33.
So far no luck.
That seems like a much more complicated issue...
So I would like this bugfix to stand alone as a paste from wayland only fix.
(the copy to wayand to eclipse issue is anyhow fixed upstream)

@mickaelistria
Copy link
Contributor

OK. Can you please create a PR for master?
We usually don't backport much in Eclipse Platform because we don't build older branches, so backporting shows no strong benefit.

@the-snowwhite
Copy link
Contributor Author

@mickaelistria
OK --> #861

the-snowwhite added a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 7, 2023
This makes it possible to paste into eclipse from a KDE/QT app
the-snowwhite added a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 7, 2023
enables paste from KDE/QT apps in a wayland session.
@the-snowwhite
Copy link
Contributor Author

@mickaelistria
I have just opened #863
It needs a thorough review as:
It's somewhat a more complex complement to #861
Which I also included since It relies on that code.
Please feel welcome to specify any changes needed.

the-snowwhite added a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 8, 2023
enables paste from KDE/QT apps to Eclipse in a wayland session.
the-snowwhite added a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 8, 2023
enables paste from KDE/QT apps in a wayland session.
akurtakov pushed a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 8, 2023
enables paste from KDE/QT apps to Eclipse in a wayland session.
the-snowwhite added a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 8, 2023
This makes it possible to paste into eclipse from a KDE/QT app
mickaelistria pushed a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 8, 2023
enables paste from KDE/QT apps in a wayland session.
mickaelistria pushed a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 8, 2023
enables paste from KDE/QT apps in a wayland session.
the-snowwhite added a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 8, 2023
enables paste from KDE/QT apps to Eclipse in a wayland session.
the-snowwhite added a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 8, 2023
enables paste from KDE/QT apps to Eclipse in a wayland session.
the-snowwhite added a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 9, 2023
akurtakov pushed a commit to akurtakov/eclipse.platform.swt that referenced this issue Nov 9, 2023
enables paste from KDE/QT apps to Eclipse in a wayland session.
iloveeclipse added a commit to iloveeclipse/eclipse.platform.swt that referenced this issue Nov 10, 2023
1) The utf-8 content should be same as in UTF8_STRING, it just should
use different label/type id.
2) The change in ClipboardProxy.setData() was non functional and makes
no sense, it only leaks memory/wastes time

See eclipse-platform#863
See eclipse-platform#851
iloveeclipse added a commit to iloveeclipse/eclipse.platform.swt that referenced this issue Nov 10, 2023
iloveeclipse added a commit that referenced this issue Nov 10, 2023
1) The utf-8 content should be same as in UTF8_STRING, it just should
use different label/type id.
2) The change in ClipboardProxy.setData() was non functional and makes
no sense, it only leaks memory/wastes time

See #863
See #851
@the-snowwhite the-snowwhite changed the title Cannot copy from KDE Applications to Eclipse in Wayland session Cannot copy/paste to/from KDE Applications to Eclipse in Wayland session (qt_wayland_clipboard_fix) Nov 10, 2023
@the-snowwhite
Copy link
Contributor Author

@mickaelistria
@iloveeclipse
sorry for the delay but I had chores to do, seems like you came up with the correct actions meanwhile 🥇
I can now 99.7% confirm that a90888b
Fully fixes the complications introduced in 666b7fd
reducing it to the same nice simplicity as my first commit fixing the 1 issue that the original title of this issue described: bbd763b

I have now verified that commit bbd763b together with the a90888b combination of 666b7fd
Was apply-able to R_29_Maintenance.

After the 2 mvn compilations I was the possible to confirm that full wayland clipboard functionality worked in all my 2023-09 installs running on ubuntu-LTS base without the gtk wayland fix (gtk 3.24.22).

Via copying the 3 renamed swt jar binaries in the plugin folder.

A great thanks to all involved in expanding this issue from 1 to 2 and resolving all the interesting mishaps that came up.

the-snowwhite added a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 11, 2023
…set=utf-8 to TextTransfer().

This makes it possible to paste into eclipse from a KDE/QT app in a
wayland session with gtkv3.24.33 and higher(ubuntu 22.04-LTS).
the-snowwhite added a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 11, 2023
…ain;charset=utf-8 to the wayland

clipboard

Enables copy from eclipse to KDE/QT apps in a wayland session(RFC-1341)
the-snowwhite pushed a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 11, 2023
Fix wrong implementation of TEXT_PLAIN_UTF8 transfer feature due to
commit 666b7fd
the-snowwhite pushed a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 11, 2023
Fix wrong implementation of TEXT_PLAIN_UTF8 transfer feature due to
commit 666b7fd
@the-snowwhite
Copy link
Contributor Author

For the record
The clean and reworded versions of the 3 commits involved in providing wayland full QT-clipboard functionality.
and finally solving #421 in Eclipse swt.
master...the-snowwhite:eclipse.platform.swt:wayland_qt_paste_copy_fix_R4.29

@the-snowwhite
Copy link
Contributor Author

the-snowwhite commented Nov 11, 2023

A nice Header generated by Github ?
issue_851_final_commit_PR image
Just for the record:
https://github.com/the-snowwhite/eclipse.platform.swt/tree/wayland_qt_paste_copy_fix_R4.29

the-snowwhite added a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 12, 2023
…set=utf-8 to TextTransfer().

This makes it possible to paste into eclipse from a KDE/QT app in a
wayland session with gtkv3.24.33 and higher(ubuntu 22.04-LTS).
the-snowwhite added a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 12, 2023
…ain;charset=utf-8 to the wayland

clipboard

Enables copy from eclipse to KDE/QT apps in a wayland session(RFC-1341)
the-snowwhite pushed a commit to the-snowwhite/eclipse.platform.swt that referenced this issue Nov 12, 2023
Fix wrong implementation of TEXT_PLAIN_UTF8 transfer feature due to
commit 666b7fd
@the-snowwhite the-snowwhite changed the title Cannot copy/paste to/from KDE Applications to Eclipse in Wayland session (qt_wayland_clipboard_fix) A possible bug: Cannot copy/paste to/from KDE Applications to Eclipse in Wayland session (qt_wayland_clipboard_fix) Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants