New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wibox.widget.systray: missing application icons #986
Comments
Is this on master? But I've also seen a missing icon once in a while lately. |
Yes, it is git master at 441587a on the pictures. |
Could you gather some information about the missing icons? Start with |
OK, this is what it looks like and here is the gist. |
Apparently the number of systray applications and their launch order does matter. If I kill nm-applet, the tray is redrawn and transmission icon with a gear handle is left lonely sitting in the shrinked systray as if nothing had happened. |
Thanks. I can't spot any difference between them and the values that I was interested in ( Could you try making you wibox larger (e.g. by adding Edit: I looked at stalone tray. They also ignore size hints if KLUDGE_USE_ICONS_HINTS is disabled in the settings. I think that this is the default. So apparently, no, this cannot be due to size hints... :-( |
Then I'm out of ideas. This always means to try the sledgehammer: Could you run awesome and transmission under xtrace (also known as x11trace; http://xtrace.alioth.debian.org/) and get me the resulting trace files?
It would be best if you do as few things to Xephyr as possible. If the above is enough at reproducing the problem, please kill Xephyr somehow instead of shutting down awesome, transmission-gtk and nm-applet properly. This should produce a smaller log file. Thanks |
All right, I managed somehow to pull that xtrace thing off. Indeed the problem is reproducible under Xephyr, nm-applet is not needed. There are 1500 lines or so of the real harsh logfile and a Xephyr screenshot with interrogation mark as before. I tried not to touch anything inside Xephyr before killing it.
|
Sigh... I don't know. So in line 275 GTK starts identifying the systray. Systray window is In line 388, the X11 server tells transmission/GTK "the user can now see your window" and line 389 is an Expose event (="Please draw this window"). Around line 568, GTK does some things to the tray icon (like querying its size and children (why would it have children????)). In line 646 it tries to resize the tray icon to size 24x24 (awesome will ignore this request). So... why would GTK ignore the expose event that tells it to redraw the icon? As a (very cheap) work-around, you could mess with the systray's background color to force a redraw of the icon. For example, the following should do: -- Add somewhere globally and use this in your wibox, so that we get a reference to the systray
local my_systray_icon = wibox.widget.systray()
local orig_bg = beautiful.bg_systray
function force_systray_redraw()
beautiful.bg_systray = "#ff0000" -- Assuming this is not the actual BG color of your systray
my_systray:emit_signal("widget::redraw_needed")
gears.timer.start_new(0.5, function()
beautiful.bg_systray = orig_bg
my_systray:emit_signal("widget::redraw_needed")
end)
end |
Oh, that was a great breakdown. Unfortunately your workaround didn't help. I bound Under the circumstances I can guess my GTK (3.14.13 from CentOS 7) is deadly broken in some way or another (e.g. violates some X11 protocol). Edit: I tried running tint2 right ontop of AwesomeWM and it was able to handle all my tray application icons without a hitch, like stalonetray earlier. |
Good idea. Thanks a lot!
So... yeah. Could you test the following patch? It should/might tell GTK that its resize request was ignored. diff --git a/event.c b/event.c
index c4e2ea3..58ea414 100644
--- a/event.c
+++ b/event.c
@@ -404,6 +404,24 @@ event_handle_configurerequest(xcb_configure_request_event_t *ev)
/* Ignore this so that systray icons cannot resize themselves.
* We decide their size!
*/
+ /* Anyway, send back a synthetic configure notify to let them known the
+ * resize was ignored. Does any spec say anything about this? (EDIT: Xembed says "the embedder acts like a WM to the embedded window, see ICCCM"; so... yup!)
+ */
+ /* ..... :-( */
+ xcb_get_geometry_reply_t *geom = xcb_get_geometry_reply(globalconf.connection,
+ xcb_get_geometry_unchecked(globalconf.connection, ev->window),
+ NULL);
+ if (geom)
+ {
+ area_t area;
+ area.x = geom->x;
+ area.y = geom->y;
+ area.width = geom->width;
+ area.height = geom->height;
+
+ xwindow_configure(ev->window, area, 0);
+ }
+ p_delete(&geom);
}
else
event_handle_configurerequest_configure_window(ev); Also, why does nm-applet work, but transmission-gtk does not? Are both of them using GTK3 or is one GTK2 and the other GTK3? |
Certainly your patch did the trick and all of my bitty icons are back now triggering fierce joy ^__^ albeit I'm not sure about that Steam thing from #487 whether it going to like it or not since I don't ever use it. I didn't do a test run that thorough to comprehend every possible graphical toolkit either. Right now all my GTK3 (nm-applet, transmission-gtk, caja, pasystray, pnmixer, firefox + firetray), GTK2 (seamonkey + firetray) and Qt4 (keepassx) application icons are confirmed to display correctly with the patch.
Absolutely no idea, all applications from the OP (being broken or not) use GTK 3.14.13 except keepassx which uses Qt4. |
Since commit 4daa6e8, we are denying resizes and moves for embedded windows (=tray icons). However, the Xembed spec says that the embedding client acts like a WM (as specified by ICCCM) to the embedded window. Thus, when denying a configure request, we have to inform the window by sending it a synthetic configure notify. Otherwise, GTK seems to sometimes not draw its tray icon. Fixes: awesomeWM#986 Signed-off-by: Uli Schlachter <psychon@znc.in>
I fetched and tested the code from #990 and I can confirm it works just as good as original patch from #986 (comment) does on my system. Looking forward to it getting merged. |
Since commit 4daa6e8, we are denying resizes and moves for embedded windows (=tray icons). However, the Xembed spec says that the embedding client acts like a WM (as specified by ICCCM) to the embedded window. Thus, when denying a configure request, we have to inform the window by sending it a synthetic configure notify. Otherwise, GTK seems to sometimes not draw its tray icon. Fixes: #986 Signed-off-by: Uli Schlachter <psychon@znc.in>
Thanks! |
The oddball problem I came across lately is that inherent systray widget doesn't show some application icons (transmission-gtk, pasystray) while others (nm-applet, keepassx) are shown just fine. Here is a screenshot with interrogation marks I put where applications icons are supposed to be drawn. The empty areas are clickable with mouse, producing respective application menus or other actions.
Compare with an external implementation of the systray protocol (http://stalonetray.sourceforge.net/), all four applications icons are sheer working.
I wonder if the issue could be connected to our incurring icon frenzy #908 somehow.
The text was updated successfully, but these errors were encountered: