Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
sowm: Changes for easier patching
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanaraps committed Feb 20, 2020
1 parent 21a35be commit e491a63
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions sowm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit e491a63

Please sign in to comment.