GNOME Bugzilla – Bug 741169
Mouse pointer disappears and flickers after keyboard shortcuts
Last modified: 2015-01-28 10:16:19 UTC
This bug was first reported in Ubuntu bug tracker: https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/1387219 Pressing Ctrl (so also using keyboard shortcuts like Ctrl+(Z/X/C/V)) makes the pointer disappear and flicker when moved. It goes back to normal after making the window lose focus. It seems that affects also packages like Anjuta, both in GTK 3.10 and 3.14
Can you test the text widget (GtkTextView) with gtk3-demo? Does it happen with other widgets?
I tried copying and pasting whith keyboard in almost every test, no sign of the problem. I'm running GTK 3.10.8 on Ubuntu 14.04.1 In the Ubuntu bug report GtkSourceView has been pointed out. How can i test it?
If the bug doesn't occur with GtkTextView and occurs only with applications that use GtkSourceView, then yes, it's probably a GtkSourceView bug. GtkSourceView comes with test programs, when you compile from sources. You can run tests/test-widget for example. I cannot reproduce the bug on Fedora, with GTK+ 3.14 or from git master (with Jhbuild).
Are there downstream patches for GtkSourceView in Ubuntu?
Sorry, was my mistake in first post: the problem is encountered on 3.10 and 3.12, not 3.14. In fact some Ubuntu users managed to solve it by installing GTK 3.14. This is the only patch applied downstream, i guess: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/gtksourceview3/trusty/files/head:/debian/patches/
I will test it as soon as possible
I ran test-widget, the flickering didn't happen. Also it was linked to libgtksourceview.so installed in the system, so definitely it's not the problem.
When you compile GtkSourceView and run test-widget, do you use GTK+ 3.10 from Ubuntu? You can verify that with: $ pkg-config --modversion gtk+-3.0 And which version of GtkSourceView did you test? The bug comes maybe from a downstream patch in the Ubuntu GTK+ package. Can you test with the latest GTK+ 3.10.x vanilla? (without any downstream patches)
Yes, i wrote that i was using the one installed in the system, so it was from Ubuntu. The exact version is 3.10.3. Now i'm going to test with upstream GTK
LD_LIBRARY_PATH=/usr/local/lib ldd /usr/bin/gedit | grep local libgtk-3.so.0 => /usr/local/lib/libgtk-3.so.0 (0x00007fc928250000) libgdk-3.so.0 => /usr/local/lib/libgdk-3.so.0 (0x00007fc927d95000) with vanilla GTK 3.10.8 installed in local. The problem is still there.
Ok, since the bug is fixed in GTK+ 3.14 but not in 3.12 nor 3.10, one or more commits should probably be backported. But note that the latest 3.10 release is 3.10.9.
You are right, it's .9 So i tested 3.10.9 and 3.12.2, always the same. I would test 3.14, but it's a mess because i have outdated dependencies in my system.
You can build with Jhbuild: https://wiki.gnome.org/Projects/Jhbuild And do a git bisect to see which commit fixes the problem.
I built GTK 3.15.2 with Jhbuild, and wth it didn't fix it! I suspect there is something wrong with system-specific configuration i have in common with other users.
So with gtk3-demo, the bug occurs only with GtkTextView (multi-line text area)? From GTK+ 3.10 to git master?
Ok, i'll do a recap I'm using gtk3-demo from the same source tree of GTK version, instead gedit is always the same, the one installed in ubuntu 14.04 Vanilla 3.10.9: GtkTextView, bug absent - gedit, bug present Vanilla 3.12.2: GtkTextView, bug absent - gedit, bug present Vanilla 3.15.2: GtkTextView, bug absent - gedit, bug present System 3.10.8: GtkTextView, bug absent - gedit, bug present Also remember that the problem is present in other programs like Anjuta and gnome-calculator, so is not gedit specific I tried testing in other WMs different from Unity, nothing changes.
Mmm, so let's move this bug again in GtkSourceView. Strange that we cannot reproduce the bug. So the mouse disappears and flickers only above a GtkSourceView widget? When the mouse is over other parts of the application, for example in the gedit side panel or over the digit buttons in gnome-calculator, does the mouse flickers too?
I don't think so, it seems that gnome-calculator doesn't use GtkSourceView, and still the bug is present. By the way the pointer flickers only on the text area, not on the buttons or the panels.
gnome-calculator also uses GtkSourceView, for the completion of math functions among other things. But I don't know if it was already the case for the 3.10 version. But you said that the bug doesn't occur with GtkSourceView's test-widget… So the bug is maybe somewhere else.
Try maybe with a Fedora live-usb or live-dvd, to see if the problem comes from Ubuntu.
I'm not involved in GTK development, but i guess from ldd and a quick grep in gnome-calculator 3.10 source tree that this version doesn't use GtkSourceView. Well, i'm out of ideas now. Maybe this could help you? https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/1387219/comments/11
The bug comes maybe from the ubuntu-desktop package, or the stuff that Ubuntu loads for GTK+. See: https://developer.gnome.org/gtk3/stable/gtk-running.html Please provide the output of: $ env | grep GTK Try to run gedit without any GTK+ module, with something like: $ GTK_MODULES="" gedit When doing that ensure that you use GTK+ upstream, in a jhbuild shell for instance.
env | grep GTK GTK_MODULES=unity-gtk-module GTK_IM_MODULE=xim Actually every time i tried vanilla GTK no modules were loaded, i can say it from the debug messages on the terminal. It couldn't even set the proper theme. By the way i tried again, no results.
I don't know what else you can test, apart testing with another Linux distro, for example Fedora.
I'm closing this bug since no further information has been provided, but feel free to reopen the bug if you have more information.
This is somehow coming from ibus which by default in Ubuntu is set as the 'Keyboard Method input system' If the above is set to 'none' the issue goes away or if ibus-gtk is installed then the issue also disappears.
Editing a basic text file, the weird behavior starts after copying a text, the mouse cursor starts flickering a lot, ibus-daemon and ibus-x11 then take 100% CPU. CPU back to normal as soon as another window than gedit gets active.
You should report that downstream, on launchpad for Ubuntu. I don't have the problem on Fedora.
Well downstream asked to report upstream ;) https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/1387219 I'll report that to downstream then, thanks for investigating.