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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Alexander Polakov-2
 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

Reply | Threaded
Open this post in threaded view
|

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

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