Re: [cwm patch 4/6] Unmaximize window when moving it

2012-04-08 Thread Stuart Henderson
this will really get in my way, if it goes in, it needs to be configurable

On 2012/02/12 14:18, Alexander Polakov wrote:
>  every window manager around does this, i guess
> 
> diff --git a/client.c b/client.c
> index 74bb2e2..1daa4c2 100644
> --- a/client.c
> +++ b/client.c
> @@ -438,7 +438,11 @@ client_resize(struct client_ctx *cc)
>  void
>  client_move(struct client_ctx *cc)
>  {
> - XMoveWindow(X_Dpy, cc->win, cc->geom.x, cc->geom.y);
> + int x = cc->geom.x;
> + int y = cc->geom.y;
> + if ((cc->flags & CLIENT_MAXFLAGS) == CLIENT_MAXIMIZED)
> + client_maximize(cc);
> + XMoveWindow(X_Dpy, cc->win, x, y);
>   xu_configure(cc);
>  }
>  
> -- 
> 1.7.6



[cwm patch 4/6] Unmaximize window when moving it

2012-04-08 Thread Alexander Polakov
 every window manager around does this, i guess

diff --git a/client.c b/client.c
index 74bb2e2..1daa4c2 100644
--- a/client.c
+++ b/client.c
@@ -438,7 +438,11 @@ client_resize(struct client_ctx *cc)
 void
 client_move(struct client_ctx *cc)
 {
-   XMoveWindow(X_Dpy, cc->win, cc->geom.x, cc->geom.y);
+   int x = cc->geom.x;
+   int y = cc->geom.y;
+   if ((cc->flags & CLIENT_MAXFLAGS) == CLIENT_MAXIMIZED)
+   client_maximize(cc);
+   XMoveWindow(X_Dpy, cc->win, x, y);
xu_configure(cc);
 }
 
-- 
1.7.6