[Enhancement] Change APP_UID from 'libprs500' to 'Calibre'

Bug #1623397 reported by Alessio Piccoli on 2016-09-14
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

This is a very minor issue,
but is possible to change the APP_UID value in src/calibre/gui2/__init__.py from 'libprs500' to 'Calibre' ?

The APP_UID is used as application name and it looks very strange in some windows selector.

For example I'm using Ubuntu XFCE, see the attached example.png to see how it looks (compared to Firefox).

Thank you and compliments to all Calibre developers for the great work.

Alessio Piccoli (geckoblu) wrote :
Kovid Goyal (kovid) wrote :

The problem is that the APP_UID is used to store Qt specific settings (APP_UID is set as the applicationName, which is used by QSettings). Changing it would mean that those settings get lost. Where is XFCE getting that value from. Running xprop on a calibre window yields the following

                window state: Normal
                icon window: 0x0
XdndAware(ATOM) = BITMAP
WM_NAME(STRING) = "calibre - || library ||"
_NET_WM_NAME(UTF8_STRING) = "calibre - || library ||"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x3e, 0x7e, 0x0, 0x0
WM_CLIENT_LEADER(WINDOW): window id # 0x200000d
                Client accepts input or input focus: True
                Initial state is Normal State.
WM_CLASS(STRING) = "calibre-gui", "libprs500"
                user specified location: 0, 32
                user specified size: 3840 by 2128
                program specified minimum size: 1366 by 864
                program specified resize increment: 2 by 2
                program specified base size: 0 by 0
                window gravity: Static

The only place I can see libprs500 there is the second value for WM_CLASS. Is that what XFCE uses? If so, looking at the Qt sourcecode, there seems to be no way to override this behavior, see the function QXcbIntegration::wmClass()

Perhaps you should open a bug request with Qt requesting some API to override this. If they implement it, I will be happy to use it in calibre to override this behavior.

Although, I have to say that, IMO, using the second value of WM_CLASS is incorrect. The first value should be used. For instance, all calibre programs, the main GUI, the viewer and the editor all have the second value of WM_CLASS set to APP_UID.

Changed in calibre:
status: New → Won't Fix

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: Won't Fix → Fix Released
Alessio Piccoli (geckoblu) wrote :

Thank you

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments