sowm: Changes for easier patching

This commit is contained in:
Dylan Araps 2020-02-20 16:08:47 +02:00
parent 21a35be863
commit e491a637fe
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 7 additions and 5 deletions

12
sowm.c
View File

@ -16,6 +16,7 @@ static unsigned int ww, wh;
static Display *d;
static XButtonEvent mouse;
static Window root;
static void (*events[LASTEvent])(XEvent *e) = {
[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);
XMoveResizeWindow(d, cur->w, 0, 0, sw, sh);
} else
} else {
XMoveResizeWindow(d, cur->w, cur->wx, cur->wy, cur->ww, cur->wh);
}
}
void win_to_ws(const Arg arg) {
@ -261,10 +263,10 @@ int main(void) {
signal(SIGCHLD, SIG_IGN);
XSetErrorHandler(xerror);
int s = DefaultScreen(d);
Window root = RootWindow(d, s);
sw = XDisplayWidth(d, s);
sh = XDisplayHeight(d, s);
int s = DefaultScreen(d);
root = RootWindow(d, s);
sw = XDisplayWidth(d, s);
sh = XDisplayHeight(d, s);
XSelectInput(d, root, SubstructureRedirectMask);
XDefineCursor(d, root, XCreateFontCursor(d, 68));