Grab server with client_resize border preview
This commit is contained in:
parent
8925e99525
commit
e165f0fe2b
@ -619,7 +619,6 @@ client_maximize(struct client *c)
|
||||
client_moveresize(c, &c->geo);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Client factor resize: allow clients to be resized in
|
||||
* manual tile layout.
|
||||
@ -727,6 +726,7 @@ client_fac_resize(struct client *c, enum position p, int fac)
|
||||
return;
|
||||
*/
|
||||
|
||||
XGrabServer(W->dpy);
|
||||
XGrabKeyboard(W->dpy, W->root, True, GrabModeAsync, GrabModeAsync, CurrentTime);
|
||||
|
||||
rgc = XCreateGC(W->dpy, c->tag->frame, GCFunction | GCSubwindowMode | GCLineWidth, &xgc);
|
||||
@ -787,6 +787,8 @@ client_fac_resize(struct client *c, enum position p, int fac)
|
||||
{
|
||||
SLIST_FOREACH(gc, &c->tag->clients, tnext)
|
||||
client_moveresize(gc, &gc->tgeo);
|
||||
|
||||
layout_save_set(c->tag);
|
||||
}
|
||||
/* Aborted with escape, Set back original geos */
|
||||
else
|
||||
@ -798,7 +800,9 @@ client_fac_resize(struct client *c, enum position p, int fac)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XFreeGC(W->dpy, rgc);
|
||||
XUngrabServer(W->dpy);
|
||||
XUngrabKeyboard(W->dpy, CurrentTime);
|
||||
}
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
#include "client.h"
|
||||
#include "util.h"
|
||||
|
||||
static void
|
||||
void
|
||||
layout_save_set(struct tag *t)
|
||||
{
|
||||
struct client *c;
|
||||
@ -233,6 +233,8 @@ layout_split_arrange_closed(struct client *ghost)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
layout_save_set(ghost->tag);
|
||||
}
|
||||
|
||||
/* Integrate a client in split layout: split sc and fill c in new geo */
|
||||
@ -259,6 +261,8 @@ layout_split_integrate(struct client *c, struct client *sc)
|
||||
|
||||
client_moveresize(c, &g);
|
||||
client_moveresize(sc, &sc->geo);
|
||||
|
||||
layout_save_set(c->tag);
|
||||
}
|
||||
|
||||
/* Arrange inter-clients holes:
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
/* Debug */
|
||||
#define DGEO(G) printf(": %d %d %d %d\n", G.x, G.y, G.w, G.h)
|
||||
|
||||
void layout_save_set(struct tag *t);
|
||||
void layout_free_set(struct tag *t);
|
||||
void layout_split_integrate(struct client *c, struct client *sc);
|
||||
void layout_split_arrange_closed(struct client *ghost);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user