Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 118439 - wrong mouse cursor theme in KDE inside gtk applications when using gtk+ 2.8
Summary: wrong mouse cursor theme in KDE inside gtk applications when using gtk+ 2.8
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: Low minor (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
: 118443 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-01-09 11:34 UTC by Tilen
Modified: 2007-07-08 13:06 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tilen 2006-01-09 11:34:27 UTC
Overview Description:
After updating gtk+ to version 2.8.8 I found out mouser cursor changes to default when mouse hover over gtk application like firefox-bin, thunderbird-bin, x-chat (only text input part of window) ect.

Steps to Reproduce:
1) In KDE Control Center/Peripherals/Mouse/Curosor Theme set custom mouse theme.
2) Install/update gtk+ to version 2.8.8
3) Open firefox and drag mouse inside firefox window.

Actual Results:
Mouse cursor changes from custom theme set in KDE control panel to default cursor theme.

Expected Results:
Mouse cursor theme dosen't change from window to window.

Solution:
Change /usr/share/cursors/xorg-x11/default/index.theme to

[Icon Theme]
Inherits=<custom theme>

and create/change file ~/.gtkrc-2.0 to

gtk-cursor-theme-size = 16

else mouse pointer is oversized. However solution aint excatly elegant and user need to set cursor theme twice, first in KDE and then in 2 config files. I don't remeber this problem from other distributions. I'm not KDE or gtk expert but is it possible to make that bit more automatic or at least warn user at upgrade? It was all working in gtk 2.6.

Portage info:
Portage 2.0.53 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r2, 2.6.14-gentoo-r5 i686)
=================================================================
System uname: 2.6.14-gentoo-r5 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System version 1.12.0_pre13
ccache version 2.3 [enabled]
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=prescott -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo http://gentoo.math.bme.hu http://gentoo.tiscali.nl/gentoo/"
LINGUAS="sl en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X aac alsa apm arts audiofile avi berkdb bitmap-fonts bzip2 cdr crypt curl dvd emboss encode exif expat fam ffmpeg flac foomaticdb fortran ftp gdbm gif glut gpm gtk gtk2 hal idn imagemagick imlib ipv6 java jpeg junit kde kdeenablefinal lcms libg++ libwww live lua mad matroska mikmod mmx mng mp3 mpeg msn nas ncurses nls nptl nptlonly nvidia ogg oggvorbis openal opengl pam pcre pdflib perl png python qt quicktime readline real sdl slang spell sse sse2 ssl svga tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts udev unicode usb v4l vorbis win32codecs wmf xine xml2 xv xvid zlib linguas_sl linguas_en userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS
Comment 1 François Bissey 2006-01-09 16:37:32 UTC
I suffer from the same problem. I set the cursor theme in kde and it
is respected by all applications except firefox (I don't have the other
apps mentionned in the oiginal report). The problem appears in both
version 1.0.7 and 1.5 (regular ebuilds not binaries) and seem to disappear 
when downgrading to gtk+-2.6 (see http://forums.gentoo.org/viewtopic.php?p=3018485 ).
My other gtk apps (gimp, gtali ...) and non-kde and non-gtk apps (emacs...)
behave correctly.
I have the problem on both ppc and x86.
I also use the gtk-engines-qt but it doesn't seem to affect the cursor choice.
The only place kde sets the cursor theme is in $HOME/.kde/share/cong/kdeglobals 
as far as I know.
The fix suggested earlier is only good on a single user system or systems
were you want the cursor style to be fixed for all users. As soon as you
have 2 users who wants differents themes (my case) the 'fix' is useless.
It also appears that .Xdefaults settings for the cursor are not respected
by firefox (same forum thread).
Comment 2 Tilen 2006-01-10 12:48:29 UTC
In link you posted is also multiuser solution. There is no need to edit /usr/share/cursors/xorg-x11/default/index.theme only ~/.gtkrc-2.0. So .gtkrc-2.0 should look like (it's copied from forum, just to have everything in bug report):

gtk-cursor-theme-size = 16
gtk-cursor-theme-name = "<theme name>"

Working OK on my box.
Comment 3 François Bissey 2006-01-10 16:11:52 UTC
(In reply to comment #2)
> In link you posted is also multiuser solution. There is no need to edit
> /usr/share/cursors/xorg-x11/default/index.theme only ~/.gtkrc-2.0. So
> .gtkrc-2.0 should look like (it's copied from forum, just to have everything in
> bug report):
> 
> gtk-cursor-theme-size = 16
> gtk-cursor-theme-name = "<theme name>"
> 
> Working OK on my box.
> 
OK I will try this. That still leave the question of
why it seems only to affect some programs and not some
other and why it happened when switching to gtk+2.8 .
If it is a new behavior kde or gtk-engines-qt should 
be patched (probably upstream) to set the correct cursor
theme in gtk. 
(I looked at the forum again and the last post with the 
fix has been edited since I posted my comment which is why
I didn't see it.)
Comment 4 Thomas van Kampen 2006-01-10 23:32:39 UTC
I noticed this happens only in FireFox and Thunderbird. I suspect this is a GTK+ 2.8.8 and Mozilla problem.
Comment 5 François Bissey 2006-01-11 21:20:31 UTC
An update on this.
I tried the fix in the forum post and it works, you don't 
have to worry about the size as it should be covered by the 
theme (unless you want to change it of course). 
Trying a different set of cursors that would make things obvious
(I set KDE to whiteglass and .gtkrc-2.0 to handheld) I tried various 
gtk applications to see the extent of the problem.
For this example let's take the Gimp (2.2.8) and notice I have
gtk-engine-qt (in case it matters). At first it seems that my
KDE settings was faithfully applied to the Gimp in spite of the
gtk setting. Until I hovered on the word "Paintbrush" in the 
mainwindow which suddenly appear with a handheld (red) cursor.
Other similar area in the Gimp are affected (line of text with
an arrow box and a cross box at the far right, the box themselve
reverted to whiteglass). After removing cursor-theme settings from 
.gtkrc-2.0 I found that indeed in those areas the Gimp was behaving
like firefox regarding cursor-themes.
So it looks like the theme setting breaks down for some areas
of gtk apps and that mozilla apps use this kind of area almost
exclusively.
So is this a gtk+ bug in the end?
Comment 6 radfoj 2006-01-12 14:33:10 UTC
Hi guys,

although I am not sure, if you are interested, I want only inform you, that I faced to big cursors in some apps in KDE after upgrading to gtk+ 2.8 - and in my case not only Firefox and Thunderbird were affected, but also aMule a Vlc

I wrote about it here - http://forums.gentoo.org/viewtopic-p-2961821.html

Comment 7 François Bissey 2006-01-12 15:01:27 UTC
(In reply to comment #6)
> Hi guys,
> 
> although I am not sure, if you are interested, I want only inform you, that I
> faced to big cursors in some apps in KDE after upgrading to gtk+ 2.8 - and in
> my case not only Firefox and Thunderbird were affected, but also aMule a Vlc
> 
> I wrote about it here - http://forums.gentoo.org/viewtopic-p-2961821.html
> 
I confess having read your forum post when looking at this problem.
Do you have to specifically set the size in your ".gtkrc.mine" or just 
setting the cursor theme here would be enough?
I will have a look at vlc at home to see if the frontend, which should be
wxgtk, is affected on my machine.
I also notice that you set your cursor by over-riding the default cursor
in /usr/local/share/cursor/xorg-x11/default and not by setting it under
KDE (under peripheral->mouse) may be there is something to do to inherit
the size as well. I would probably have linked the "default" directory to 
the "gentoo-blue" directory personally.
Also as a curiosity what is auto writting your .gtkrc-2.0 file? 
Comment 8 radfoj 2006-01-12 15:53:03 UTC
(In reply to comment #7)

> Do you have to specifically set the size in your ".gtkrc.mine" or just 
> setting the cursor theme here would be enough?

I had not problem with cursor-theme, but with the size. Theme was same, as in other apps, but cursor was too big. Setting gtk-cursor-theme-name in my  ".gtkrc.mine" was not enough, I had to set gtk-cursor-theme-size = 16

> I also notice that you set your cursor by over-riding the default cursor
> in /usr/local/share/cursor/xorg-x11/default and not by setting it under
> KDE (under peripheral->mouse) may be there is something to do to inherit
> the size as well. I would probably have linked the "default" directory to 
> the "gentoo-blue" directory personally.

Sorry, dont understand it much - problem is on my side. But I will try to tell you this experience with different user:
1) So I have set "gentoo-blue" as my system-wide default cursors, as mentioned in xorg-x11 postmerge print_info.
2) I just opened another account on my box and set in Kcontrol another cursor theme - "gentoo" (it have different color) and restarted KDE.
3) Than in almost every app "gentoo" cursor theme was used. Not in Firefox, aMule, Vlc - this apps are still using system-wide "gentoo-blue" cursors and with bigger size. Solution to control theme and size for FF, aMule and Vlc here is again only  ~/.gtkrc-2.0 file. Sorry, ~/.gtkrc.mine in my case :-)

> Also as a curiosity what is auto writting your .gtkrc-2.0 file? 
I am using x11-themes/gtk-theme-switch. 

Comment 9 François Bissey 2006-01-12 16:09:13 UTC
(In reply to comment #8)
> (In reply to comment #7)
> Sorry, dont understand it much - problem is on my side. But I will try to tell
> you this experience with different user:
> 1) So I have set "gentoo-blue" as my system-wide default cursors, as mentioned
> in xorg-x11 postmerge print_info.

Never read that message. I may check if I reemerge xorg-x11, but you probably
did the right thing then.

> 2) I just opened another account on my box and set in Kcontrol another cursor
> theme - "gentoo" (it have different color) and restarted KDE.
> 3) Than in almost every app "gentoo" cursor theme was used. Not in Firefox,
> aMule, Vlc - this apps are still using system-wide "gentoo-blue" cursors and
> with bigger size. Solution to control theme and size for FF, aMule and Vlc here
> is again only  ~/.gtkrc-2.0 file. Sorry, ~/.gtkrc.mine in my case :-)
> 
So in this new account gtk-theme-switch is also running and has an effect.
I am now thinking that your size problem may be related to gtk-theme-switch 
but I don't feel like installing it to test.
Anyway since the behavior appeared with gtk+2.8 and it occurs in the same
areas of apps (I think), it is probably related.
Comment 10 radfoj 2006-01-13 01:54:48 UTC
(In reply to comment #9)


> > I have set "gentoo-blue" as my system-wide default cursors, as mentioned
> > in xorg-x11 postmerge print_info.
> 
> Never read that message. I may check if I reemerge xorg-x11, but you probably
> did the right thing then.

If you are interested, open /usr/portage/x11-base/xorg-x11/xorg-x11-6.8.2-r6.ebuild and look at the bottom - section print_info()

> So in this new account gtk-theme-switch is also running and has an effect.
> I am now thinking that your size problem may be related to gtk-theme-switch 
> but I don't feel like installing it to test.

I dont think so. gtk-theme-switch is small GUI app. After you launch it, you choose theme for your gtk+ apps,  also font and font-size. After "apply" it generates you ~/.gtkrc-2.0. You dont have to know exact syntax of this conf and so. Example - after choosing Luxi Sans, size 11 and theme clearlooks, ~/.gtkrc-2.0 looks like this:

# -- THEME AUTO-WRITTEN DO NOT EDIT
include "/usr/share/themes/Clearlooks/gtk-2.0/gtkrc"

style "user-font" {
	font_name = "Luxi Sans 11"
}

widget_class "*" style "user-font"

gtk-font-name="Luxi Sans 11"

include "/home/radfoj/.gtkrc.mine"

# -- THEME AUTO-WRITTEN DO NOT EDIT

Never had any problem with it, also many KDE people are using it. Why .gtkrc.mine? I think its purpose is for not loosing your specific setting. Becouse if you need add some additional line to ~/.gtkrc-2.0, you will loose it, after you run gtk-theme-swich someday in the future to change theme of font. 

Now a little test under my test KDE account/user. 
1) Before booting into it, I deleted there ~/.gtkrc-2.0 - so there is nothing gtk-theme-swich related. I hope so.
2) Then I started some gtk+ app GFTP - and some default ugly theme was used. Cursor-theme was used "gentoo", correctly as I have set in Kcontrol. No any ~/.gtkrc-2.0 file.
3) Starting Firefox, system-wide "gentoo-blue" cursors were used (so it doesnt care about theme I have set in Kcontrol, now after upgrade of gtk+-2.8 and its size was again too big - maybe 24, 32 - dont know exactly. 

Comment 11 Krzysztof Pawlik (RETIRED) gentoo-dev 2006-01-19 08:24:41 UTC
*** Bug 118443 has been marked as a duplicate of this bug. ***
Comment 12 Bols 2006-01-28 10:45:55 UTC
Just to clarify the situation.

This issue was not specitic to KDE, Gnome and others WMs like fluxbox were also affected by this odd behaviour as you can see on this bug report: http://bugs.gentoo.org/show_bug.cgi?id=118443

Maybe we should reassign this report to another team as this one was originally assigned to the Gentoo KDE team. It would allow to resolve this bug more quicly.

As a Gnome user, I can also tell that this bug seems to be gone with the upgrade from gnome-2.10 to 2.12. Anyone could confirm this?
Comment 13 Denilson Sá Maia 2006-02-01 04:19:18 UTC
I can confirm this bug. I just updated GTK from 2.6 to 2.8 and this bug popped up.

I use fluxbox, and this bug happens with any GTK-2 app. This includes Firefox (most notable) and xchat (only the "text" cursor).

Yes, I think this should be reassigned to Gnome/GTK team. KDE has nothing to do with this bug.
Comment 14 Stefan Behte (RETIRED) gentoo-dev Security 2006-02-01 07:40:23 UTC
Same opinion over here; see http://bugs.gentoo.org/show_bug.cgi?id=118443
Comment 15 Carsten Lohrke (RETIRED) gentoo-dev 2006-02-01 15:58:20 UTC
The KDE team can hardly do anything about this....
Comment 16 Denilson Sá Maia 2006-10-19 16:37:23 UTC
I guess this is fixed in current stable GTK+ versions. Can anyone confirm this?
Comment 17 Wulf Krueger (RETIRED) gentoo-dev 2007-06-01 21:59:53 UTC
kde herd is out of here. :-)
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2007-07-08 13:06:56 UTC
Doesn't move anywhere and I cannot reproduce it anymore. Feel free to reopen if it's still and issue w/ >=gtk+-2.10.11