kolbusa / stalonetray

STAnd aLONE TRAY (notification area) implementation for X11
https://kolbusa.github.io/stalonetray
GNU General Public License v2.0
130 stars 12 forks source link

problem using stalonetray with mwm #23

Open gcomes opened 1 year ago

gcomes commented 1 year ago

I want to use stalonetray with mwm. The idea is to have a horizontal system tray window that expands when I add an applet and shrinks back when I remove the applet. If I use the command: stalonetray -geometry 1x1+100+100 --grow-gravity W I get the expected behaviour:

start stalonetray: empty tray's window at X start applet1: tray's window at X applet icon at X start applet2: tray's window at X,X+1 applet icons at X,X+1 start applet3: tray's window at X,X+1,X+2 applet icons at X,X+1,X+2 delete applet: tray's window at X,X+1 applet icons at X,X+1 delete applet: tray's window at X applet icon at X delete applet: empry tray's window at X

However when I use the command: stalonetray -geometry 1x1+100+100 --grow-gravity E I get some buggy results:

start stalonetray: empty tray's window at X start applet1: tray's window at X applet icon at X start applet2: tray's window at X-1,X applet icons at X(visible),X+1(not visible) start applet3: tray's window at X-1,X,X+1 applet icons at X+1(v),X+2(nv),X+3(nv) should be: X-2,X-1,X delete applet: tray's window at X+2,X+3 applet icons at X+3(v),X+4(nv) should be: X-1,X delete applet: tray's window at X+4 applet icon at X+4(v) should be: X delete applet: empry tray's window at X+4

That is: the system tray window get shifted to the right and some applet icons are placed where are not visible. I tested stalonetray with openbox and it works as expected, so the issue is with mwm. Is there some known command line option that can be used to fix the problem? I did try --no-shrink and --kludges fix_window_pos but it didn't help. I observed the problem on opensuse and centos. I guess if you have access to mwm you should be able to easily reproduce the bug. If not, I can provide any trace log necessary.

rsdubtso commented 1 year ago

Hi @gcomes. Thanks for the report. I will certainly look into this, but unfortunately I am not able to dedicate any serious time to this project. The only thing I can suggest at this moment is to look into --icon-gravity NE (the default is NW). If this is really a bug (which it may very well be -- the code has a lot of bugs), then fixing it will certainly take some time...

gcomes commented 1 year ago

I tested the option --icon-gravity NE. No luck. I also enabled log trace and compared the output when using mwm and openbox to see if there was something easy to spot, but if there was, I couldn't see it. I guess for the time being I'll have to use --grow-gravity W and wait until you have time to look in to the problem.