mirror of
https://github.com/dylanaraps/sowm.git
synced 2025-05-19 09:30:24 -07:00
sowm: Set minimum resize amount.
This commit is contained in:
parent
5cc5d25823
commit
5547cc3a51
4
sowm.c
4
sowm.c
@ -58,8 +58,8 @@ void notify_motion(XEvent *e) {
|
|||||||
XMoveResizeWindow(d, mouse.subwindow,
|
XMoveResizeWindow(d, mouse.subwindow,
|
||||||
wx + (mouse.button == 1 ? xd : 0),
|
wx + (mouse.button == 1 ? xd : 0),
|
||||||
wy + (mouse.button == 1 ? yd : 0),
|
wy + (mouse.button == 1 ? yd : 0),
|
||||||
ww + (mouse.button == 3 ? xd : 0),
|
MAX(1, ww + (mouse.button == 3 ? xd : 0)),
|
||||||
wh + (mouse.button == 3 ? yd : 0));
|
MAX(1, wh + (mouse.button == 3 ? yd : 0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void key_press(XEvent *e) {
|
void key_press(XEvent *e) {
|
||||||
|
3
sowm.h
3
sowm.h
@ -3,6 +3,7 @@
|
|||||||
#define win (client *t=0, *c=list; c && t!=list->prev; t=c, c=c->next)
|
#define win (client *t=0, *c=list; c && t!=list->prev; t=c, c=c->next)
|
||||||
#define ws_save(W) ws_list[W] = list
|
#define ws_save(W) ws_list[W] = list
|
||||||
#define ws_sel(W) list = ws_list[ws = W]
|
#define ws_sel(W) list = ws_list[ws = W]
|
||||||
|
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||||
|
|
||||||
#define win_size(W, gx, gy, gw, gh) \
|
#define win_size(W, gx, gy, gw, gh) \
|
||||||
XGetGeometry(d, W, &(Window){0}, gx, gy, gw, gh, \
|
XGetGeometry(d, W, &(Window){0}, gx, gy, gw, gh, \
|
||||||
@ -12,7 +13,7 @@
|
|||||||
#define mod_clean(mask) (mask & ~(numlock|LockMask) & \
|
#define mod_clean(mask) (mask & ~(numlock|LockMask) & \
|
||||||
(ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask))
|
(ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask))
|
||||||
|
|
||||||
typedef union {
|
typedef struct {
|
||||||
const char** com;
|
const char** com;
|
||||||
const int i;
|
const int i;
|
||||||
const Window w;
|
const Window w;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user