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

can't paste from xwayland apps in wayland #2079

Open
ghost opened this issue Feb 4, 2019 · 16 comments
Open

can't paste from xwayland apps in wayland #2079

ghost opened this issue Feb 4, 2019 · 16 comments
Milestone

Comments

@ghost
Copy link

ghost commented Feb 4, 2019

Using sway from latest master as windows manager,
geany 1.34.1
archlinux

If I try to paste text in geany from an xwayland app (firefox, calibre), it doesn't work. It seems to work fine when pasting from a wayland app (gnome-terminal, zathura).

I think it's a bug in geany, because pasting works fine in gedit, for example.

@b4n
Copy link
Member

b4n commented Feb 4, 2019

Does pasting work outside the main editing area, like search entry or alike? If it does, could you check if you encounter the same issue with SciTE? It might very well be a bug in Scintilla, the underlying editing widget Geany uses.

@ghost
Copy link
Author

ghost commented Feb 4, 2019

you are right, it works in the "find" window. I'm installing scite now

@ghost
Copy link
Author

ghost commented Feb 4, 2019

Scite works fine! 😕

@b4n
Copy link
Member

b4n commented Feb 4, 2019

As surprising as it is, it's an interesting info :)
Could you try out Geany's development version and see if it's better? It uses a newer Scintilla release, so that might help.

@ghost
Copy link
Author

ghost commented Feb 4, 2019

great news, it works with latest master! ✨

@b4n b4n added this to the 1.35 milestone Feb 4, 2019
@b4n b4n added the scintilla label Feb 4, 2019
@b4n
Copy link
Member

b4n commented Feb 4, 2019

Wonderful :) So I'll close this as to be included in next release. We likely won't make a point release with this fix ATM.
Thanks for investigating this!

@b4n b4n closed this as completed Feb 4, 2019
@v44r
Copy link

v44r commented Jan 2, 2020

Is this really fixed since 1.35? In 1.36 I cannot paste from firefox (xwayland), but can paste from wayland apps (including firefox started with MOZ_ENABLE_WAYLAND=1).

@ghost
Copy link
Author

ghost commented Jan 11, 2020

Uh, actually that's true, it doesn't work with xwayland apps like calibre. I don't remember about what was going on last year, but it doesn't work now.

@ceisserer
Copy link

why was this bug report closed - according to the last comment, the reporter actually mentions it still is broken.
Same for me, with geany 1.37.1 on xwayland, copy&paste does not work from the editing area.

@elextr
Copy link
Member

elextr commented Aug 18, 2021

Its closed because the OP reported it working.

That a further problem has been discovered probably would have been better as a new report.

There are a number of reports of Wayland/XWayland issues with many programs, basically xwayland isn't X11 and doesn't work the same, so apps written for X11 like GTK seem to have problems with xwayland.

Since none of the devs have a suitable setup (AFAIK) you will need to provide more information, starting with running Geany as a Wayland app, as Xwayland and (if possible) with proper X11.

@elextr elextr reopened this Aug 18, 2021
@hollunder
Copy link

Copy/pasting on Linux with the various clip boards is a bloody mess to begin with. Bugs like this do not help.
I do run Geany through Sway and more often than not copying between Geany and something else does not work.
It seems Geany runs as Wayland applications by default, probably because GTK applications generally do.
So which information do you actually require to debug and fix whatever this is?

@elextr
Copy link
Member

elextr commented Jan 15, 2022

@hollunder thanks for the offer, first would be to build and try with the latest Git version since it has major upgrades of Scintilla (note don't use this version in production just yet, there may be issues with plugins ATM)

@hollunder
Copy link

I assume Geany ships Scintilla in its codebase?

I hope building it using this is fine? It would be the most convenient and cleanest way for me to install the git head. https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=geany-git

The other thing that I think I will need is some sort of test setup, other applications to test this with. Probably also a way to inspect the different clipboards. Suggestions regarding this are welcome since I do have other applications that cause me trouble which I will have to debug separately (c/p from vim or terminal (urxvt) in general).

@elextr
Copy link
Member

elextr commented Jan 15, 2022

Yes Scintilla is designed to be built-in to apps that use it.

Best way to do a simple build is:

cd somewhere, even home is fine
mkdir geany-git; cd geany-git
git clone https://github.com/geany/geany.git
cd geany
./autogen.sh --prefix=absolute path to somewhere/geany-git
make install
cd ../bin; ./geany -c ../config
test test test
cd ../..; rm -rf geany-git

That installs and runs a totally isolated copy of Geany that does not interfere with your system, remember I said don't use the git version in production yet, and you can remove it when finished.

[Edit: I can't advise on how to test, remember the reason we need you to test it is we can't reproduce the fault due to not using a system with the relevant configuration so don't know what will/won't work]

@hollunder
Copy link

Thanks, this may be good. Can two instances of Geany, one from the distro and the git build, run in parallel or would they share config files or other resources? If not then I could even test Geany against Geany.

Anyway, I think I will need to come up with some test cases that are as simple as possible. There are just too many variables involved, we would easily end up in a hairball and attribute issues to the wrong programs.
For example if I ctrl+c in Geany and ctrl+v in urxvt running just zsh it does not paste anything. This is more likely a problem with urxvt than geany, but it could also be wayland or xwayland or wl-paste or clipman. Even more if there is an editor running in urxvt. I hope you see the point and why I need to look into how to inspect clipboards and selections. This may take me a bit.

@elextr
Copy link
Member

elextr commented Jan 15, 2022

or would they share config files or other resources?

Running Geany with -c ../config means it uses a separate config directory from your home one, and its inside the geany-git tree so it goes away with that tree. All Geany resources are referenced to prefix, and the one in geany-git has that as its prefix, so doesn't use any of your system geany resources. Obviously they share system libraries which is what we want to test. You can keep the new version around as long as you want of course, just cd geany-git/bin; ./geany -c ../config to run it again. Note the ./ when running the separate Geany, essential, if you forget it will run the system Geany.

[Edit: just to be totally clear, doing it this way will allow both system and the geany-git to run at the same time independently]

Agree there are many moving parts, but you need to try enough combinations to identify the source of the issue, maybe keep a table:

copy from paste to result
wayland Geany X11 urxvt fail
xwayland Geany X11 urxvt pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants