Compare commits
2 Commits
37090bd2ba
...
22cd0f5f43
| Author | SHA1 | Date | |
|---|---|---|---|
| 22cd0f5f43 | |||
| ca083f97bd |
1
calmwm.h
1
calmwm.h
@@ -76,7 +76,6 @@ size_t strlcpy(char *, const char *, size_t);
|
|||||||
#define CWM_LEFT 0x0004
|
#define CWM_LEFT 0x0004
|
||||||
#define CWM_RIGHT 0x0008
|
#define CWM_RIGHT 0x0008
|
||||||
#define CWM_BIGAMOUNT 0x0010
|
#define CWM_BIGAMOUNT 0x0010
|
||||||
#define CWM_CENTER 0x0020
|
|
||||||
#define CWM_UP_BIG (CWM_UP | CWM_BIGAMOUNT)
|
#define CWM_UP_BIG (CWM_UP | CWM_BIGAMOUNT)
|
||||||
#define CWM_DOWN_BIG (CWM_DOWN | CWM_BIGAMOUNT)
|
#define CWM_DOWN_BIG (CWM_DOWN | CWM_BIGAMOUNT)
|
||||||
#define CWM_LEFT_BIG (CWM_LEFT | CWM_BIGAMOUNT)
|
#define CWM_LEFT_BIG (CWM_LEFT | CWM_BIGAMOUNT)
|
||||||
|
|||||||
1
conf.c
1
conf.c
@@ -102,7 +102,6 @@ static const struct {
|
|||||||
{ FUNC_CC(window-movetogroup-7, client_movetogroup, 7) },
|
{ FUNC_CC(window-movetogroup-7, client_movetogroup, 7) },
|
||||||
{ FUNC_CC(window-movetogroup-8, client_movetogroup, 8) },
|
{ FUNC_CC(window-movetogroup-8, client_movetogroup, 8) },
|
||||||
{ FUNC_CC(window-movetogroup-9, client_movetogroup, 9) },
|
{ FUNC_CC(window-movetogroup-9, client_movetogroup, 9) },
|
||||||
{ FUNC_CC(window-snap-center, client_snap, (CWM_CENTER)) },
|
|
||||||
{ FUNC_CC(window-snap-up, client_snap, (CWM_UP)) },
|
{ FUNC_CC(window-snap-up, client_snap, (CWM_UP)) },
|
||||||
{ FUNC_CC(window-snap-down, client_snap, (CWM_DOWN)) },
|
{ FUNC_CC(window-snap-down, client_snap, (CWM_DOWN)) },
|
||||||
{ FUNC_CC(window-snap-right, client_snap, (CWM_RIGHT)) },
|
{ FUNC_CC(window-snap-right, client_snap, (CWM_RIGHT)) },
|
||||||
|
|||||||
2
cwmrc.5
2
cwmrc.5
@@ -401,8 +401,6 @@ pixels right.
|
|||||||
Resize window 10 times
|
Resize window 10 times
|
||||||
.Ar moveamount
|
.Ar moveamount
|
||||||
pixels left.
|
pixels left.
|
||||||
.It window-snap-center
|
|
||||||
Snap window to center.
|
|
||||||
.It window-snap-up
|
.It window-snap-up
|
||||||
Snap window to top edge.
|
Snap window to top edge.
|
||||||
.It window-snap-down
|
.It window-snap-down
|
||||||
|
|||||||
15
kbfunc.c
15
kbfunc.c
@@ -165,7 +165,7 @@ kbfunc_client_move_mb(void *ctx, struct cargs *cargs)
|
|||||||
|
|
||||||
client_ptr_inbound(cc, 1);
|
client_ptr_inbound(cc, 1);
|
||||||
|
|
||||||
if (XGrabPointer(X_Dpy, sc->rootwin, False, MOUSEMASK,
|
if (XGrabPointer(X_Dpy, cc->win, False, MOUSEMASK,
|
||||||
GrabModeAsync, GrabModeAsync, None, Conf.cursor[CF_MOVE],
|
GrabModeAsync, GrabModeAsync, None, Conf.cursor[CF_MOVE],
|
||||||
CurrentTime) != GrabSuccess)
|
CurrentTime) != GrabSuccess)
|
||||||
return;
|
return;
|
||||||
@@ -254,7 +254,7 @@ kbfunc_client_resize_mb(void *ctx, struct cargs *cargs)
|
|||||||
|
|
||||||
xu_ptr_set(cc->win, cc->geom.w, cc->geom.h);
|
xu_ptr_set(cc->win, cc->geom.w, cc->geom.h);
|
||||||
|
|
||||||
if (XGrabPointer(X_Dpy, sc->rootwin, False, MOUSEMASK,
|
if (XGrabPointer(X_Dpy, cc->win, False, MOUSEMASK,
|
||||||
GrabModeAsync, GrabModeAsync, None, Conf.cursor[CF_RESIZE],
|
GrabModeAsync, GrabModeAsync, None, Conf.cursor[CF_RESIZE],
|
||||||
CurrentTime) != GrabSuccess)
|
CurrentTime) != GrabSuccess)
|
||||||
return;
|
return;
|
||||||
@@ -270,8 +270,8 @@ kbfunc_client_resize_mb(void *ctx, struct cargs *cargs)
|
|||||||
continue;
|
continue;
|
||||||
ltime = ev.xmotion.time;
|
ltime = ev.xmotion.time;
|
||||||
|
|
||||||
cc->geom.w = ev.xmotion.x - cc->geom.x - cc->bwidth;
|
cc->geom.w = ev.xmotion.x;
|
||||||
cc->geom.h = ev.xmotion.y - cc->geom.y - cc->bwidth;
|
cc->geom.h = ev.xmotion.y;
|
||||||
client_apply_sizehints(cc);
|
client_apply_sizehints(cc);
|
||||||
client_resize(cc, 1);
|
client_resize(cc, 1);
|
||||||
screen_prop_win_draw(sc,
|
screen_prop_win_draw(sc,
|
||||||
@@ -323,13 +323,6 @@ kbfunc_client_snap(void *ctx, struct cargs *cargs)
|
|||||||
(cc->bwidth * 2);
|
(cc->bwidth * 2);
|
||||||
flags &= ~CWM_DOWN;
|
flags &= ~CWM_DOWN;
|
||||||
}
|
}
|
||||||
if (flags & CWM_CENTER) {
|
|
||||||
cc->geom.x = area.x +
|
|
||||||
(area.w - cc->geom.w - cc->bwidth) / 2;
|
|
||||||
cc->geom.y = area.y +
|
|
||||||
(area.h - cc->geom.h - cc->bwidth) / 2;
|
|
||||||
flags &= ~CWM_CENTER;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
client_move(cc);
|
client_move(cc);
|
||||||
client_ptr_inbound(cc, 1);
|
client_ptr_inbound(cc, 1);
|
||||||
|
|||||||
@@ -69,11 +69,8 @@ void (*xev_handlers[LASTEvent])(XEvent *) = {
|
|||||||
[Expose] = xev_handle_expose,
|
[Expose] = xev_handle_expose,
|
||||||
};
|
};
|
||||||
|
|
||||||
static KeySym modkeys[] = { XK_Control_L, XK_Control_R,
|
static KeySym modkeys[] = { XK_Alt_L, XK_Alt_R, XK_Super_L, XK_Super_R,
|
||||||
XK_Alt_L, XK_Alt_R,
|
XK_Control_L, XK_Control_R, XK_ISO_Level3_Shift };
|
||||||
XK_Meta_L, XK_Meta_R,
|
|
||||||
XK_Super_L, XK_Super_R,
|
|
||||||
XK_ISO_Level3_Shift };
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xev_handle_maprequest(XEvent *ee)
|
xev_handle_maprequest(XEvent *ee)
|
||||||
|
|||||||
Reference in New Issue
Block a user