summaryrefslogtreecommitdiff
path: root/sys/src/cmd/rio/rio.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2016-02-13 16:36:24 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2016-02-13 16:36:24 +0100
commitc3867623ae93eca77ba6e4f3d851240442f02caf (patch)
treec699ffbb3c22a919785ee51ced41ff9344a42b21 /sys/src/cmd/rio/rio.c
parenteeb96dca21dfc28afa69f3d00fa6f2cdb7e9b1b8 (diff)
rio: fix wrong frame colors when moving non-current window
When a window is moved or reshaped, that implicitely tops the window and makes it current. The conseqence of this is that we always have to redraw the window as if it where a current window in any case. This was handled for Reshaped windows, but not when the window was just moved. We now handle both cases the exact same way, getting rid of the Moved wctl message.
Diffstat (limited to 'sys/src/cmd/rio/rio.c')
-rw-r--r--sys/src/cmd/rio/rio.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/sys/src/cmd/rio/rio.c b/sys/src/cmd/rio/rio.c
index 424b28640..29f5a024b 100644
--- a/sys/src/cmd/rio/rio.c
+++ b/sys/src/cmd/rio/rio.c
@@ -28,8 +28,7 @@ void unhide(int);
void newtile(int);
Image *sweep(void);
Image *bandsize(Window*);
-Image* drag(Window*, Rectangle*);
-void refresh(Rectangle);
+Image* drag(Window*);
void resized(void);
Channel *exitchan; /* chan(int) */
Channel *winclosechan; /* chan(Window*); */
@@ -457,7 +456,6 @@ mousethread(void*)
int sending, inside, scrolling, moving, band;
Window *w, *winput;
Image *i;
- Rectangle r;
Point xy;
Mouse tmp;
enum {
@@ -546,13 +544,10 @@ mousethread(void*)
if(band)
i = bandsize(winput);
else
- i = drag(winput, &r);
+ i = drag(winput);
sweeping = 0;
if(i != nil){
- if(band)
- wsendctlmesg(winput, Reshaped, i->r, i);
- else
- wsendctlmesg(winput, Moved, r, i);
+ wsendctlmesg(winput, Reshaped, i->r, i);
cornercursor(winput, mouse->xy, 1);
}
if(wclose(winput) == 0)
@@ -931,7 +926,7 @@ drawborder(Rectangle r, int show)
}
Image*
-drag(Window *w, Rectangle *rp)
+drag(Window *w)
{
Point p, op, d, dm, om;
Rectangle r;
@@ -964,7 +959,6 @@ drag(Window *w, Rectangle *rp)
readmouse(mousectl);
return nil;
}
- *rp = r;
return allocwindow(wscreen, r, Refbackup, DNofill);
}
@@ -1135,15 +1129,14 @@ move(void)
{
Window *w;
Image *i;
- Rectangle r;
w = pointto(FALSE);
if(w == nil)
return;
incref(w);
- i = drag(w, &r);
+ i = drag(w);
if(i)
- wsendctlmesg(w, Moved, r, i);
+ wsendctlmesg(w, Reshaped, i->r, i);
cornercursor(w, mouse->xy, 1);
wclose(w);
}