[hackers] [wmii] Hide bar on non-primary Xinerama screens for 3.9 release. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Fri, 2 Oct 2009 02:10:01 +0000 (UTC)

changeset: 2504:7163d4bcb9db
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Thu Oct 01 21:56:58 2009 -0400
files: cmd/wmii/bar.c
description:
Hide bar on non-primary Xinerama screens for 3.9 release.

diff -r 14f6a5b79924 -r 7163d4bcb9db cmd/wmii/bar.c
--- a/cmd/wmii/bar.c Thu Oct 01 21:49:24 2009 -0400
+++ b/cmd/wmii/bar.c Thu Oct 01 21:56:58 2009 -0400
@@ -35,7 +35,8 @@
         s->barwin->aux = s;
         xdnd_initwindow(s->barwin);
         sethandler(s->barwin, &handlers);
- mapwin(s->barwin);
+ if(s == screens[0])
+ mapwin(s->barwin);
 }
 
 void
@@ -43,7 +44,10 @@
 
         s->brect = s->r;
         s->brect.min.y = s->r.max.y - labelh(def.font);
- reshapewin(s->barwin, s->brect);
+ if(s == screens[0])
+ reshapewin(s->barwin, s->brect);
+ else
+ s->brect.min.y = s->r.max.y;
         /* FIXME: view_arrange. */
 }
 
@@ -51,10 +55,14 @@
 bar_setbounds(WMScreen *s, int left, int right) {
         Rectangle *r;
 
+ if(s != screens[0])
+ return;
+
         r = &s->brect;
         r->min.x = left;
         r->max.x = right;
- reshapewin(s->barwin, *r);
+ if(Dy(*r))
+ reshapewin(s->barwin, *r);
 }
 
 void
@@ -67,7 +75,8 @@
         dy = Dy(*r);
         r->min.y = y;
         r->max.y = y + dy;
- reshapewin(s->barwin, *r);
+ if(Dy(*r))
+ reshapewin(s->barwin, *r);
 }
 
 Bar*
Received on Fri Oct 02 2009 - 02:10:01 UTC

This archive was generated by hypermail 2.2.0 : Fri Oct 02 2009 - 02:12:06 UTC