-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
BAR_SYSTRAY_PATCH and XRDB_PATCH colour issue #429
Comments
I can imagine that happening. I take it that this is specifically when not using the alpha patch? |
Yes, my full patchlist is:
|
When changing colour scheme during runtime using xrdb the systray and icons would keep the original colours. To work around that the systray icon windows need to be redrawn after changing the background pixel value. Just calling XClearWindow for each systray window results in the systray icons disappearing, they do not automatically redraw. The solution is apparently to send an Expose event to each window which should in principle trigger a redraw from the application side. One way to achieve this is to move the window out of the drawable area. When the window is then brought back into view the X server will send the Expose event for the window. The "easiest" way to do this is to move the entire systray window out of view as part of the xrdb call. It is possible to do this in the draw_systray function itself, but we probably do not want to do this every single time the bar is drawn and it may also cause some noticeable flickering. This issue is isolated to using the systray without the alpha patch.
It is an interesting problem. I added some proposed changes, let me know if that works for you. Happy to discuss if someone has better ideas for how to address systray icon window redraw issues. |
I tried this fix, but it did not help. Background updates only when the icon updates (e.g. new unread message counter update in Telegram), but not with |
I tried with Telegram and I was not able to replicate. Maybe it depends on how it is installed and if it is packaged (for me telegram-desktop is installed as a straight binary, Arch AUR). In any case the window manager does not have any direct control over the content of windows, so if the application does not redraw the systray icon following an Expose event then I am not sure if there is anything that can be done to force a redraw of the icon. You should be able to test this by using the keybinding of MOD+b to hide the bar and once more to show the bar again. If the systray icon does not update then it is possible that the application does not react to Expose events for the systray icon. Worth checking with multiple systray applications to see if only one is affected or all of them. There are two workarounds that I can think of:
|
When I update dwm colours with
dwmc xrdb
, the system tray icons keep the old background colour, but not the new one.The text was updated successfully, but these errors were encountered: