Web lists-archives.com

Re: Aw: Re: setWindowIcon for QDialog




On Donnerstag, 7. März 2019 21:02:49 CET Martin Flöser wrote:
> [...]
> Not in this case as the window is missing the icon property as can be
> seen in the xprop output.
> 
> But apart from that: yes if the desktop file is specified, the icon is
> preferred over the custom icon. But in this specific case it's not the
> reason.

I checked it again with another window manager. Again, it's 
https://cgit.kde.org/labplot.git/tree/src/kdefrontend/datasources/
DatabaseManagerDialog.cpp#n48

with the icon "network-server-database":
 
alex@notebook:/usr/share/icons/breeze>find . -name network-server-database*
./places/16/network-server-database.svg
./places/22/network-server-database.svg

xporp for this dialog is:

_NET_WM_ICON_NAME(UTF8_STRING) = 
_KDE_NET_WM_DESKTOP_FILE(UTF8_STRING) = "org.kde.labplot2"
_KDE_NET_WM_COLOR_SCHEME(STRING) = "/usr/share/color-schemes/
BreezeHighContrast.colors"
XdndAware(ATOM) = BITMAP
_KDE_NET_WM_USER_CREATION_TIME(CARDINAL) = 28374773
WM_NAME(STRING) = "SQL Database Connections"
_NET_WM_NAME(UTF8_STRING) = "SQL Database Connections — labplot2"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x26, 0x1e, 0x0, 0x0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DIALOG, 
_NET_WM_WINDOW_TYPE_NORMAL
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0x8400008
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: True
                window id # of group leader: 0x8400008
WM_CLIENT_MACHINE(STRING) = "notebook"
_NET_WM_PID(CARDINAL) = 16708
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 138412230
WM_CLASS(STRING) = "labplot2", "labplot2"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, 
_NET_WM_SYNC_REQUEST, _NET_WM_CONTEXT_HELP
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                user specified location: 764, 306
                user specified size: 1012 by 726
                program specified minimum size: 553 by 596
                window gravity: Static


The icon "network-server-database" is not shown in the window title bar. 
Killing kwin, starting openbox -> the proper icon is shown. Killing openbox, 
starting kwin_x11 -> application's default icon is shown. I don't know how the 
window managers are supposed to do the job here, but somehow openbox manages 
to show the proper icon despite the empty string 
_NET_WM_ICON_NAME(UTF8_STRING)... 


-- 
 Alexander