[Enhancement] Change APP_UID from 'libprs500' to 'Calibre'
Bug #1623397 reported by
Alessio Piccoli
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
This is a very minor issue,
but is possible to change the APP_UID value in src/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
To post a comment you must log in.
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
_NET_WM_ DESKTOP( CARDINAL) = 3
window state: Normal
icon window: 0x0 USER_TIME( CARDINAL) = 603455882 ICON_NAME( UTF8_STRING) = ICON(CARDINAL) = NAME(UTF8_ STRING) = "calibre - || library ||" WM_HINTS( _MOTIF_ WM_HINTS) = 0x3, 0x3e, 0x7e, 0x0, 0x0 WINDOW_ TYPE(ATOM) = _NET_WM_ WINDOW_ TYPE_NORMAL INFO(_XEMBED_ INFO) = 0x0, 0x1 LEADER( WINDOW) : window id # 0x200000d
Client accepts input or input focus: True
Initial state is Normal State. PID(CARDINAL) = 29031 SYNC_REQUEST_ COUNTER( CARDINAL) = 33554454 SYNC_REQUEST HINTS(WM_ SIZE_HINTS) :
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
WM_STATE(WM_STATE):
_NET_WM_
_NET_WM_
_NET_WM_
XdndAware(ATOM) = BITMAP
WM_NAME(STRING) = "calibre - || library ||"
_NET_WM_
_MOTIF_
_NET_WM_
_XEMBED_
WM_CLIENT_
WM_HINTS(WM_HINTS):
_NET_WM_
_NET_WM_
WM_CLASS(STRING) = "calibre-gui", "libprs500"
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_
WM_NORMAL_
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.