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
WM_STATE(WM_STATE): window state: Normal icon window: 0x0
_NET_WM_USER_TIME(CARDINAL) = 603455882
_NET_WM_ICON_NAME(UTF8_STRING) =
_NET_WM_ICON(CARDINAL) =
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
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0x200000d
WM_HINTS(WM_HINTS): Client accepts input or input focus: True Initial state is Normal State.
_NET_WM_PID(CARDINAL) = 29031
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 33554454
WM_CLASS(STRING) = "calibre-gui", "libprs500"
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_NORMAL_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
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.
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.