darkfeline / wmii

Automatically exported from code.google.com/p/wmii
MIT License
0 stars 0 forks source link

Witray + Dual Screen: witray is not kept on the same screen as the wmii bar #250

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Default WMII setup with witray on the right side
2. Comfigure dual screen with xrandr and primary output on the left screen == 
the screen with the wmii bar

I expect the witray to be on the right side on the wmii bar just beside the 
"status" but it appears on the right screen.

With my configuration, where the right screen is smaller and aligned to the 
top, the witray appears, not only the witray is on the right side, but also it 
is on the bottom of the "virtual screen" is an non visible part. So it is not 
even possible to see it.

Result can be found attached.

Wmii from mercurial build from source updated today:

$ wmii -v
wmii-hg2813+, ©2010 Kris Maglione

$ uname -a
Linux mercator 3.0.0-19-generic #33-Ubuntu SMP Thu Apr 19 19:05:14 UTC 2012 
x86_64 x86_64 x86_64 GNU/Linux

Original issue reported on code.google.com by harterga...@gmail.com on 14 May 2012 at 12:31

Attachments:

GoogleCodeExporter commented 9 years ago
I found where it comes from, but don't know how to cleanly solve the problem.

When the witray looks to find where to be put, it uses the whole virtual screen 
to set it's position. I think that it should use the real screens like the 
windows does.
The line that does the configuration is the line with "subpt(scr.rect.max, 
r.max);"

diff -r 75881cc5391e cmd/tray/tray.c
--- a/cmd/tray/tray.c   Fri Apr 13 22:37:30 2012 -0400
+++ b/cmd/tray/tray.c   Tue May 15 11:42:58 2012 +0200
@@ -213,6 +213,10 @@
            offset.x += tray.iconsize + tray.padding;

        r = Rpt(ZP, offset);
+       /* The following line does note take the primary and secondary screens into 
account.
+        * It think that the tray should be either only printed on the primary 
screen or be 
+        * configurable to select which screen to print on.
+        */
        p = subpt(scr.rect.max, r.max);
        if(tray.edge & East)
            p.x = 0;

Original comment by harterga...@gmail.com on 15 May 2012 at 9:45