mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
stash window dimensions
This commit is contained in:
parent
8653c88c90
commit
9180bb1a06
4
calmwm.h
4
calmwm.h
@ -169,6 +169,10 @@ struct client_ctx {
|
||||
int x; /* x position */
|
||||
int y; /* y position */
|
||||
} ptr;
|
||||
struct {
|
||||
int h; /* hieght */
|
||||
int w; /* width */
|
||||
} dim;
|
||||
#define CLIENT_HIDDEN 0x0001
|
||||
#define CLIENT_IGNORE 0x0002
|
||||
#define CLIENT_VMAXIMIZED 0x0004
|
||||
|
3
client.c
3
client.c
@ -874,6 +874,9 @@ client_applysizehints(struct client_ctx *cc)
|
||||
|
||||
cc->geom.w = MAX(cc->geom.w, 1);
|
||||
cc->geom.h = MAX(cc->geom.h, 1);
|
||||
|
||||
cc->dim.w = (cc->geom.w - cc->hint.basew) / cc->hint.incw;
|
||||
cc->dim.h = (cc->geom.h - cc->hint.baseh) / cc->hint.inch;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -53,9 +53,7 @@ mousefunc_sweep_draw(struct client_ctx *cc)
|
||||
struct screen_ctx *sc = cc->sc;
|
||||
char s[14]; /* fits " nnnn x nnnn \0" */
|
||||
|
||||
(void)snprintf(s, sizeof(s), " %4d x %-4d ",
|
||||
(cc->geom.w - cc->hint.basew) / cc->hint.incw,
|
||||
(cc->geom.h - cc->hint.baseh) / cc->hint.inch);
|
||||
(void)snprintf(s, sizeof(s), " %4d x %-4d ", cc->dim.w, cc->dim.h);
|
||||
|
||||
XReparentWindow(X_Dpy, sc->menuwin, cc->win, 0, 0);
|
||||
XMoveResizeWindow(X_Dpy, sc->menuwin, 0, 0,
|
||||
|
Loading…
Reference in New Issue
Block a user