sowm: Changes for easier patching
This commit is contained in:
parent
21a35be863
commit
e491a637fe
12
sowm.c
12
sowm.c
|
@ -16,6 +16,7 @@ static unsigned int ww, wh;
|
||||||
|
|
||||||
static Display *d;
|
static Display *d;
|
||||||
static XButtonEvent mouse;
|
static XButtonEvent mouse;
|
||||||
|
static Window root;
|
||||||
|
|
||||||
static void (*events[LASTEvent])(XEvent *e) = {
|
static void (*events[LASTEvent])(XEvent *e) = {
|
||||||
[ButtonPress] = button_press,
|
[ButtonPress] = button_press,
|
||||||
|
@ -138,8 +139,9 @@ void win_fs(const Arg arg) {
|
||||||
win_size(cur->w, &cur->wx, &cur->wy, &cur->ww, &cur->wh);
|
win_size(cur->w, &cur->wx, &cur->wy, &cur->ww, &cur->wh);
|
||||||
XMoveResizeWindow(d, cur->w, 0, 0, sw, sh);
|
XMoveResizeWindow(d, cur->w, 0, 0, sw, sh);
|
||||||
|
|
||||||
} else
|
} else {
|
||||||
XMoveResizeWindow(d, cur->w, cur->wx, cur->wy, cur->ww, cur->wh);
|
XMoveResizeWindow(d, cur->w, cur->wx, cur->wy, cur->ww, cur->wh);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void win_to_ws(const Arg arg) {
|
void win_to_ws(const Arg arg) {
|
||||||
|
@ -261,10 +263,10 @@ int main(void) {
|
||||||
signal(SIGCHLD, SIG_IGN);
|
signal(SIGCHLD, SIG_IGN);
|
||||||
XSetErrorHandler(xerror);
|
XSetErrorHandler(xerror);
|
||||||
|
|
||||||
int s = DefaultScreen(d);
|
int s = DefaultScreen(d);
|
||||||
Window root = RootWindow(d, s);
|
root = RootWindow(d, s);
|
||||||
sw = XDisplayWidth(d, s);
|
sw = XDisplayWidth(d, s);
|
||||||
sh = XDisplayHeight(d, s);
|
sh = XDisplayHeight(d, s);
|
||||||
|
|
||||||
XSelectInput(d, root, SubstructureRedirectMask);
|
XSelectInput(d, root, SubstructureRedirectMask);
|
||||||
XDefineCursor(d, root, XCreateFontCursor(d, 68));
|
XDefineCursor(d, root, XCreateFontCursor(d, 68));
|
||||||
|
|
Reference in New Issue