mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
cvsimport
This commit is contained in:
commit
a2d0cbcf97
2
calmwm.h
2
calmwm.h
@ -339,7 +339,7 @@ struct client_ctx *client_new(Window, struct screen_ctx *, int);
|
|||||||
void client_ptrsave(struct client_ctx *);
|
void client_ptrsave(struct client_ctx *);
|
||||||
void client_ptrwarp(struct client_ctx *);
|
void client_ptrwarp(struct client_ctx *);
|
||||||
void client_raise(struct client_ctx *);
|
void client_raise(struct client_ctx *);
|
||||||
void client_resize(struct client_ctx *);
|
void client_resize(struct client_ctx *, int);
|
||||||
void client_send_delete(struct client_ctx *);
|
void client_send_delete(struct client_ctx *);
|
||||||
void client_setactive(struct client_ctx *, int);
|
void client_setactive(struct client_ctx *, int);
|
||||||
void client_setname(struct client_ctx *);
|
void client_setname(struct client_ctx *);
|
||||||
|
13
client.c
13
client.c
@ -306,7 +306,7 @@ client_maximize(struct client_ctx *cc)
|
|||||||
cc->flags |= CLIENT_MAXIMIZED;
|
cc->flags |= CLIENT_MAXIMIZED;
|
||||||
|
|
||||||
resize:
|
resize:
|
||||||
client_resize(cc);
|
client_resize(cc, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -355,7 +355,7 @@ client_vertmaximize(struct client_ctx *cc)
|
|||||||
cc->flags |= CLIENT_VMAXIMIZED;
|
cc->flags |= CLIENT_VMAXIMIZED;
|
||||||
|
|
||||||
resize:
|
resize:
|
||||||
client_resize(cc);
|
client_resize(cc, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -404,12 +404,17 @@ client_horizmaximize(struct client_ctx *cc)
|
|||||||
cc->flags |= CLIENT_HMAXIMIZED;
|
cc->flags |= CLIENT_HMAXIMIZED;
|
||||||
|
|
||||||
resize:
|
resize:
|
||||||
client_resize(cc);
|
client_resize(cc, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
client_resize(struct client_ctx *cc)
|
client_resize(struct client_ctx *cc, int reset)
|
||||||
{
|
{
|
||||||
|
if (reset) {
|
||||||
|
cc->flags &= ~CLIENT_MAXIMIZED;
|
||||||
|
cc->bwidth = Conf.bwidth;
|
||||||
|
}
|
||||||
|
|
||||||
client_draw_border(cc);
|
client_draw_border(cc);
|
||||||
|
|
||||||
XMoveResizeWindow(X_Dpy, cc->win, cc->geom.x,
|
XMoveResizeWindow(X_Dpy, cc->win, cc->geom.x,
|
||||||
|
16
group.c
16
group.c
@ -458,18 +458,12 @@ group_update_names(struct screen_ctx *sc)
|
|||||||
{
|
{
|
||||||
char **strings, *p;
|
char **strings, *p;
|
||||||
unsigned char *prop_ret;
|
unsigned char *prop_ret;
|
||||||
Atom type_ret;
|
int i = 0, j = 0, nstrings = 0, n = 0, setnames = 0;
|
||||||
int format_ret, i = 0, nstrings = 0, n = 0, setnames = 0;
|
|
||||||
unsigned long bytes_after, num_ret;
|
|
||||||
|
|
||||||
if (XGetWindowProperty(X_Dpy, sc->rootwin,
|
if ((j = xu_getprop(sc->rootwin, ewmh[_NET_DESKTOP_NAMES].atom,
|
||||||
ewmh[_NET_DESKTOP_NAMES].atom, 0, 0xffffff, False,
|
cwmh[UTF8_STRING].atom, 0xffffff, (u_char **)&prop_ret)) > 0) {
|
||||||
cwmh[UTF8_STRING].atom, &type_ret, &format_ret,
|
prop_ret[j - 1] = '\0'; /* paranoia */
|
||||||
&num_ret, &bytes_after, &prop_ret) == Success &&
|
while (i < j) {
|
||||||
prop_ret != NULL && format_ret == 8) {
|
|
||||||
/* failure, just set defaults */
|
|
||||||
prop_ret[num_ret - 1] = '\0'; /* paranoia */
|
|
||||||
while (i < num_ret) {
|
|
||||||
if (prop_ret[i++] == '\0')
|
if (prop_ret[i++] == '\0')
|
||||||
nstrings++;
|
nstrings++;
|
||||||
}
|
}
|
||||||
|
2
kbfunc.c
2
kbfunc.c
@ -118,7 +118,7 @@ kbfunc_moveresize(struct client_ctx *cc, union arg *arg)
|
|||||||
cc->geom.h = 1;
|
cc->geom.h = 1;
|
||||||
if ((cc->geom.w += mx) < 1)
|
if ((cc->geom.w += mx) < 1)
|
||||||
cc->geom.w = 1;
|
cc->geom.w = 1;
|
||||||
client_resize(cc);
|
client_resize(cc, 1);
|
||||||
|
|
||||||
/* Make sure the pointer stays within the window. */
|
/* Make sure the pointer stays within the window. */
|
||||||
xu_ptr_getpos(cc->win, &cc->ptr.x, &cc->ptr.y);
|
xu_ptr_getpos(cc->win, &cc->ptr.x, &cc->ptr.y);
|
||||||
|
@ -110,12 +110,12 @@ mousefunc_window_resize(struct client_ctx *cc, void *arg)
|
|||||||
/* don't resize more than 60 times / second */
|
/* don't resize more than 60 times / second */
|
||||||
if ((ev.xmotion.time - ltime) > (1000 / 60)) {
|
if ((ev.xmotion.time - ltime) > (1000 / 60)) {
|
||||||
ltime = ev.xmotion.time;
|
ltime = ev.xmotion.time;
|
||||||
client_resize(cc);
|
client_resize(cc, 1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ButtonRelease:
|
case ButtonRelease:
|
||||||
if (ltime)
|
if (ltime)
|
||||||
client_resize(cc);
|
client_resize(cc, 1);
|
||||||
XUnmapWindow(X_Dpy, sc->menuwin);
|
XUnmapWindow(X_Dpy, sc->menuwin);
|
||||||
XReparentWindow(X_Dpy, sc->menuwin, sc->rootwin, 0, 0);
|
XReparentWindow(X_Dpy, sc->menuwin, sc->rootwin, 0, 0);
|
||||||
xu_ptr_ungrab();
|
xu_ptr_ungrab();
|
||||||
|
Loading…
Reference in New Issue
Block a user