changeset: 2507:74566e5a79ce
user: Kris Maglione <jg_AT_suckless.org>
date: Fri Oct 02 01:48:03 2009 -0400
files: cmd/wmii/layout.c
description:
Fix drag indicator when dragging between Xinerama screens.
diff -r ccc083712e0c -r 74566e5a79ce cmd/wmii/layout.c
--- a/cmd/wmii/layout.c Fri Oct 02 00:45:26 2009 -0400
+++ b/cmd/wmii/layout.c Fri Oct 02 01:48:03 2009 -0400
@@ -27,6 +27,7 @@
Point pt;
int orientation;
int xy;
+ int screen;
};
static Rectangle
@@ -48,8 +49,8 @@
/* Keep onscreen */
p = ZP;
p.x -= min(0, r.min.x);
- p.x -= max(0, r.max.x - screen->r.max.x);
- p.y -= max(0, r.max.y - screen->brect.min.y - Dy(r)/2);
+ p.x -= max(0, r.max.x - screens[f->screen]->r.max.x);
+ p.y -= max(0, r.max.y - screens[f->screen]->brect.min.y - Dy(r)/2);
return rectaddpt(r, p);
}
@@ -75,6 +76,7 @@
sethandler(fw->w, &handlers);
fw->f = f;
+ fw->screen = f->area->screen;
fw->grabbox = f->grabbox;
frameadjust(fw, pt, orientation, n);
reshapewin(fw->w, framerect(fw));
@@ -124,7 +126,6 @@
int s;
v = selview;
- /* XXX: Multihead. Check this over. */
for(s=0; s < nscreens; s++) {
if(!rect_haspoint_p(pt, screens[s]->r))
continue;
@@ -132,7 +133,7 @@
if(pt.x < a->r.max.x)
return a;
}
- return nil; /* XXX: Multihead. */
+ return nil;
}
static void
@@ -149,9 +150,10 @@
a = find_area(pt);
if(a == nil)
- return; /* XXX: Multihead. */
+ return;
fw->ra = a;
+ fw->screen = a->screen;
pt.x = a->r.min.x;
frameadjust(fw, pt, OHoriz, Dx(a->r));
@@ -202,6 +204,7 @@
if(a == nil)
return; /* XXX: Multihead. */
+ fw->screen = a->screen;
fw->ra = nil;
minw = column_minwidth();
if(abs(pt.x - a->r.min.x) < minw/2) {
Received on Fri Oct 02 2009 - 06:52:04 UTC
This archive was generated by hypermail 2.2.0 : Fri Oct 02 2009 - 07:00:09 UTC