mirror of
https://github.com/dylanaraps/sowm.git
synced 2025-07-26 09:41:59 -07:00
sowm: Changes for easier patching
This commit is contained in:
12
sowm.c
12
sowm.c
@@ -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));
|
||||
|
Reference in New Issue
Block a user