nonameentername / wmii

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

Witray: West and East exchanged #249

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Run "witray -E" or "witray -W" and look the placement

What is the expected result? What do you see instead?

"witray -E(ast)" should run witray on the right of the screen but runs it on 
the left instead.
"witray -W(est)" should run witray on the left of the screen but runs it on the 
right instead.

The man page is, I think, wrong too:
"If  no  options  are given, witray opens to the West of whichever part of the 
screen the wmii bar occupies."
when I would suggest that i should be run to the East side == right of the 
screen, and looking on how witray looks like "icons on the left and empty space 
on the right" it should be the right side.

Wmii from mercurial compiled from sources, 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:16

GoogleCodeExporter commented 8 years ago
From the empirical tests I did, the problem may come from the file tray.c in 
the tray_update function where the test with tray.edge uses the wrong direction 
and "East" should be replaced by "West" in the test where the x position is set 
to 0.

You can find a patch attached which corrects this and updates the default 
configuration and manpages to tell it is the East side which is used.

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

Attachments:

GoogleCodeExporter commented 8 years ago
Just to show the "important" part of the patch

--- a/cmd/tray/tray.c   Fri Apr 13 22:37:30 2012 -0400
+++ b/cmd/tray/tray.c   Tue May 15 11:13:32 2012 +0200
@@ -214,7 +214,7 @@

        r = Rpt(ZP, offset);
        p = subpt(scr.rect.max, r.max);
-       if(tray.edge & East)
+       if(tray.edge & West)
            p.x = 0;

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

GoogleCodeExporter commented 8 years ago
There may still be problems in others lines related to East and West, like 
the"hints.grav" lines, but I do not understand what they are doing. I found the 
problem by trial and error, not full code understanding.

Original comment by harterga...@gmail.com on 15 May 2012 at 11:37