commit 9b5e93ba53f2028a14abee96e47890b88583e63a
parent 05dd0d2a29d0aec7ea9897327dac5512ca1cc91b
Author: Anselm R. Garbe <garbeam@wmii.de>
Date: Wed, 31 May 2006 16:34:48 +0200
fixed issue reported by Maxi, reverted to /tmp/ns.$USER.$DISPLAY/wmii socket file
Diffstat:
5 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/cmd/wm/area.c b/cmd/wm/area.c
@@ -134,7 +134,7 @@ send_to_area(Area *to, Area *from, Client *c)
{
c->revert = from;
detach_from_area(from, c);
- attach_to_area(to, c);
+ attach_to_area(to, c, True);
focus_client(c, True);
}
@@ -235,7 +235,7 @@ place_client(Area *a, Client *c)
}
void
-attach_to_area(Area *a, Client *c)
+attach_to_area(Area *a, Client *c, Bool send)
{
View *v = a->view;
unsigned int h = 0, aidx = idx_of_area(a);
@@ -248,7 +248,7 @@ attach_to_area(Area *a, Client *c)
scale_column(a, a->rect.height - h);
}
- if(aidx) { /* column */
+ if(!send && aidx) { /* column */
unsigned int nc = ncol_of_view(v);
if(v->area.data[1]->frame.size && nc && nc > v->area.size - 1) {
a = create_area(v, ++v->sel);
diff --git a/cmd/wm/view.c b/cmd/wm/view.c
@@ -202,7 +202,7 @@ attach_to_view(View *v, Client *c)
a = v->area.data[0];
else
a = v->area.data[v->sel];
- attach_to_area(a, c);
+ attach_to_area(a, c, False);
v->sel = idx_of_area(a);
}
diff --git a/cmd/wm/wm.h b/cmd/wm/wm.h
@@ -217,7 +217,7 @@ int idx_of_area(Area *a);
int idx_of_area_id(View *t, unsigned short id);
void select_area(Area *a, char *arg);
void send_to_area(Area *to, Area *from, Client *c);
-void attach_to_area(Area *a, Client *c);
+void attach_to_area(Area *a, Client *c, Bool send);
void detach_from_area(Area *a, Client *c);
Bool is_of_area(Area *a, Client *c);
Client *sel_client_of_area(Area *a);
diff --git a/cmd/wm/wmii b/cmd/wm/wmii
@@ -3,14 +3,13 @@
wmiiwm -c || exit 1
-SOCKET=`mktemp /tmp/.wmii.address.$DISPLAY.XXXXXX` || exit 2
OLD_PATH="$PATH" export OLD_PATH
PATH="$HOME/.wmii-4:CONFPREFIX/wmii-4:$PATH" export PATH
-WMII_ADDRESS=unix!$SOCKET export WMII_ADDRESS
+WMII_ADDRESS=unix!/tmp/ns.$USER.$DISPLAY/wmii export WMII_ADDRESS
+mkdir -m 700 /tmp/ns.$USER.$DISPLAY 2>/dev/null
wmiiwm -a $WMII_ADDRESS &
wmiiwmpid=$!
mkdir $HOME/.wmii-4 2>/dev/null && welcome &
wmiirc &
wait $wmiiwmpid
-rm -f $SOCKET
diff --git a/cmd/wm/wmii.1 b/cmd/wm/wmii.1
@@ -40,7 +40,7 @@ script and does all the work of setting up the window manager, the key
bindings, the bar labels, etc.
.SH FILES
.TP
-/tmp/.wmii.address.$DISPLAY.XXXXXX
+/tmp/ns.$USER.$DISPLAY/wmii
The wmii socket file which provides a 9P service.
.TP
CONFPREFIX/wmii-4