awesome

Welcome to awesome bug tracking system.
Tasklist

FS#843 - systray doesn't not obey WM_NORMAL_HINTS

Attached to Project: awesome
Opened by Kanru Chen (kanru) - Friday, 12 November 2010, 16:23 GMT
Task Type Feature Request
Category Core
Status Unconfirmed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version git/master
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 2
Private No

Details

Current systray implementation does not obey the WM_NORMAL_HINTS property.

While the systray specification says that the client should do their best to cope with any size effectively, the XEmbed specification says that the embedder should obey the client's WMNormalHints settings.

Ideally the systray should use the aspect hint or compute the aspect ratio from minimum width and height value.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Real world case:

The UIM¹ input method request a minimum 96x19 area to put 4 buttons in the systray. While the final hbox scales to fit into the square block, the buttons become barely visible.

We could fix either awesome or UIM, so I think this is a feature request instead of a bug.
This task depends upon

Comment by Uli Schlachter (psychon) - Friday, 12 November 2010, 16:29 GMT
How can I test this myself? On debian there are uim-gtk2.0, uim-qt, uim-qt3 and uim-xim which sound remotely like this, which one creates the evil tray icon?
Comment by Kanru Chen (kanru) - Friday, 12 November 2010, 16:47 GMT
uim-gtk2.0: /usr/bin/uim-toolbar-gtk-systray
Comment by Uli Schlachter (psychon) - Friday, 12 November 2010, 16:58 GMT
Thanks. Looks like one also has to enable some "buttons" in the preference dialog for this to happen.

For future reference, here are the window properties (WM_TAKE_FOCUS? honestly?):

$ xprop -id 0x2000003
WM_STATE(WM_STATE):
window state: Withdrawn
icon window: 0x0
GDK_TIMESTAMP_PROP(GDK_TIMESTAMP_PROP) = 0x61
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 33554458
_XEMBED_INFO(_XEMBED_INFO) = 0x1, 0x1
_NET_WM_USER_TIME(CARDINAL) = 9917627
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x2000004
WM_CLIENT_LEADER(WINDOW): window id # 0x2000001
_NET_WM_PID(CARDINAL) = 19011
WM_LOCALE_NAME(STRING) = "de_DE.UTF-8"
WM_CLIENT_MACHINE(STRING) = "psytux"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified minimum size: 72 by 18
window gravity: NorthWest
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = "uim-toolbar-gtk-systray", "Uim-toolbar-gtk-systray"
WM_ICON_NAME(STRING) = "uim"
_NET_WM_ICON_NAME(UTF8_STRING) = 0x75, 0x69, 0x6d
WM_NAME(STRING) = "uim"
_NET_WM_NAME(UTF8_STRING) = 0x75, 0x69, 0x6d
Comment by Uli Schlachter (psychon) - Saturday, 19 March 2011, 10:42 GMT
 FS#878  was just marked as a duplicate of this. That bug is about http://www.workrave.org.
Comment by antoine beaupré (anarcat) - Saturday, 19 March 2011, 16:15 GMT
So I was requested a bit more info about the workrave problems... here's relevant output of xwininfo -root -tree

Root window id: 0x105 (the root window) (has no name)
Parent window id: 0x0 (none)
33 children:
[...]
0x1a00004 (has no name): () 1024x19+0+0 +0+0
1 child:
0x1a00001 (has no name): () 76x19+803+0 +803+0
4 children:
0x380002c "workrave": ("workrave" "Workrave") 19x19+57+0 +860+0
1 child:
0x380002d (has no name): () 1x1+-1+-1 +859+-1
0x3800029 "Workrave Tray Icon": ("workrave" "Workrave") 19x19+38+0 +841+0
1 child:
0x380002a (has no name): () 1x1+-1+-1 +840+-1
0x800004 "gnome-power-manager": ("gnome-power-manager" "Gnome-power-manager") 19x19+19+0 +822+0
1 child:
0x800005 (has no name): () 1x1+-1+-1 +821+-1
0x600003 "Applet NetworkManager": ("nm-applet" "Nm-applet") 19x19+0+0 +803+0
1 child:
0x600004 (has no name): () 1x1+-1+-1 +802+-1

Notice how there is two workrave windows in there, for some reason. Details of each of those windows:

anarcat@marcos:~$ xprop -id 0x380002c
WM_STATE(WM_STATE):
window state: Withdrawn
icon window: 0x0
GDK_TIMESTAMP_PROP(GDK_TIMESTAMP_PROP) = 0x61
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 58720302
_XEMBED_INFO(_XEMBED_INFO) = 0x1, 0x1
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x380002d
WM_CLIENT_LEADER(WINDOW): window id # 0x3800001
_NET_WM_PID(CARDINAL) = 23760
WM_LOCALE_NAME(STRING) = "fr_CA.utf8"
WM_CLIENT_MACHINE(STRING) = "marcos"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified minimum size: 24 by 24
window gravity: NorthWest
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = "workrave", "Workrave"
WM_ICON_NAME(STRING) = "workrave"
_NET_WM_ICON_NAME(UTF8_STRING) = 0x77, 0x6f, 0x72, 0x6b, 0x72, 0x61, 0x76, 0x65
WM_NAME(STRING) = "workrave"
_NET_WM_NAME(UTF8_STRING) = 0x77, 0x6f, 0x72, 0x6b, 0x72, 0x61, 0x76, 0x65
anarcat@marcos:~$ xprop -id 0x3800029
WM_STATE(WM_STATE):
window state: Withdrawn
icon window: 0x0
GDK_TIMESTAMP_PROP(GDK_TIMESTAMP_PROP) = 0x61
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 58720299
_XEMBED_INFO(_XEMBED_INFO) = 0x1, 0x1
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x380002a
WM_CLIENT_LEADER(WINDOW): window id # 0x3800001
_NET_WM_PID(CARDINAL) = 23760
WM_LOCALE_NAME(STRING) = "fr_CA.utf8"
WM_CLIENT_MACHINE(STRING) = "marcos"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified minimum size: 24 by 19
window gravity: NorthWest
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = "workrave", "Workrave"
WM_ICON_NAME(STRING) = "Workrave Tray Icon"
_NET_WM_ICON_NAME(UTF8_STRING) = 0x57, 0x6f, 0x72, 0x6b, 0x72, 0x61, 0x76, 0x65, 0x20, 0x54, 0x72, 0x61, 0x79, 0x20, 0x49, 0x63, 0x6f, 0x6e
WM_NAME(STRING) = "Workrave Tray Icon"
_NET_WM_NAME(UTF8_STRING) = 0x57, 0x6f, 0x72, 0x6b, 0x72, 0x61, 0x76, 0x65, 0x20, 0x54, 0x72, 0x61, 0x79, 0x20, 0x49, 0x63, 0x6f, 0x6e

It sure looks like the hints are wrong, as it specifies only 24x19 or 24x24 as a minimum size...

I found a related issue in the workrave.org trackers: http://issues.workrave.org/show_bug.cgi?id=967 and I have updated that issue to reflect the above.

Loading...