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

When clicking an emoji, it just pasted whatever's in the clipboard #6

Closed
sahmes opened this issue Apr 29, 2017 · 17 comments
Closed

When clicking an emoji, it just pasted whatever's in the clipboard #6

sahmes opened this issue Apr 29, 2017 · 17 comments
Assignees
Labels

Comments

@sahmes
Copy link

sahmes commented Apr 29, 2017

On Kubuntu 14.04, installed both from source and from Debian package, both have the same effect. Choosing any emoji has the same effect as Ctrl+V, whatever was in the clipboard before is pasted to where the cursor is.

@OzymandiasTheGreat
Copy link
Owner

Pushed (hopefully) a fix just now, could you try the latest commit and see if it works?

@sahmes
Copy link
Author

sahmes commented Apr 30, 2017

Thanks for the quick response, unfortunately the problem still exists. Earlier, when I clicked an emoji, the text from the clipboard would appear immediately, now it seems there is a short delay. Also strangely when I try to add an emoji in a Firefox window, now nothing happens, while in any other program (GTK or QT) I get the clipboard content pasted. Earlier, Firefox functioned like any other program. See attached errors when starting the keyboard from the terminal. Lines 1-333 are printed at startup, lines 340 to 1003 are printed when I try to insert an emoji to a GTK application.
emoji-error.txt

@OzymandiasTheGreat
Copy link
Owner

OzymandiasTheGreat commented Apr 30, 2017

Okay, this one is because emoji-keyboard requires python 3.5. Any chance you can get python 3.5 running and see if it solves the issues?
You can get python 3.5 for your os version here.

@OzymandiasTheGreat
Copy link
Owner

OzymandiasTheGreat commented Apr 30, 2017

Did some testing and those errors should not be related to pasting emoji. In fact, everything except sorting of recent emoji should work on earlier versions of python.
Back to the pasting bug, added another timeout, can you try the latest commit?

@sahmes
Copy link
Author

sahmes commented Apr 30, 2017

Sorry, the problem persisted with the last commit with Python 3.4... I tried Python 3.5 briefly but there was some problem up the dependency tree (with gi), somehow pip didn't get a good version of it, so I was not able to test the emoji keyboard with it.

@OzymandiasTheGreat
Copy link
Owner

Hmm, I can't reproduce this at all. Anyway, made the timeouts ridiculous, could you try it again? If it doesn't work now I'm afraid I'm out of ideas.

@sahmes
Copy link
Author

sahmes commented Apr 30, 2017

It didn't solve the problem unfortunately. There is a ~3 second delay now between clicking an emoji and getting the clipboard's content pasted in the window. Maybe I'll give Python 3.5 another go later.

@sahmes
Copy link
Author

sahmes commented Apr 30, 2017

I tried Python 3.6; was not easy to figure out how to install the correct version of gi, but I did eventually. Unfortunately exactly the same as before 😞 there are no errors printed out at all.

Moreover, now the there seems to be some problem with the rendering, this is how it looks like on my screen:

emojis

@OzymandiasTheGreat
Copy link
Owner

Rendering's on gi and Gtk, I'm afraid there's nothing I can do about.
As for pasting, I'm downloading Kubuntu to see if it's something specific to your system or if it's just Gtk not playing nice with KDE.

@OzymandiasTheGreat
Copy link
Owner

Finally managed to reproduce this, not working on KDE at all. I'll try switching from Gtk to Xlib for clipboard access and see if that works.

@sahmes
Copy link
Author

sahmes commented May 1, 2017

Thanks :) Kubuntu 14.04 has some glitches with recent versions of Firefox seemingly due to the newer version of GTK, while Kubuntu 16.04 renders everything normally, maybe it's related to either the pasting bug or the bad rendering.

@OzymandiasTheGreat
Copy link
Owner

So finally got some testing done and I got bad news. Python-xlib doesn't play nice with KDE either, which leads me to believe there're some non-standard behaviors in KDE. One thing that immediately popped out was clipboard manager randomly taking over, but I guess there's more.
So in summary fixing this would require rewriting the app in qt and I have no desire or time to learn qt, sorry, marking this as won't fix.

@billwanjohi
Copy link

I'm experiencing the same in i3 window manager. Can I suggest that you update the readme to indicate only GTK-based desktop environments are supported?

@OzymandiasTheGreat
Copy link
Owner

OzymandiasTheGreat commented May 10, 2017

@sahmes , @billwanjohi Okay, I think I figured it out. Could both of you try out the latest commit and see how it works? Note that at least under KDE you need python-xlib version 0.19 which is only available through pip, so update that as well. I also introduced a new bug somehow, where exiting through indicator menu doesn't work, but sending SIGTERM works properly. I'll have to figure this out later.

@sahmes
Copy link
Author

sahmes commented May 13, 2017

Yep, the clipboard problem is resolved on Kubuntu 14.04 using Python 3.6 and Xlib 0.19 🙂

The hideous SVG distortion is still there though 😞
I really couldn't figure out how to install a fresh gi; version 1.2 here (same thing I get via pip) is actually not compatible with python 3. When installing python3-gi via apt, it goes to the (default) Python 3.4 path in my system, I manually linked it into the dist-packages of 3.6 installation, it kinda works but may be the cause of the problem.

me@myserver:~$ python3.4 -c "import gi; print(gi.__version__)"
3.12.0

Where can I find the source for this "3.12" version? Maybe it's a completely different package?

@OzymandiasTheGreat
Copy link
Owner

@sahmes Good to hear it works!
As for the rendering glitches, I'm sorry, this is over my head. No idea where to even start with this.

@billwanjohi
Copy link

@OzymandiasTheGreat rebuilding after your changes fixed my problems.

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

No branches or pull requests

3 participants