From 2de4fd3fec10eaa3ca1a1c434ba2046bcc565a83 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 7 Sep 2007 17:36:21 +0200 Subject: [PATCH] remove sx and sy since they are always 0, LOL --- client.c | 13 ++++++------- jdwm.c | 16 +++++++--------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/client.c b/client.c index f34039269..6f6418251 100644 --- a/client.c +++ b/client.c @@ -13,7 +13,6 @@ #include "layouts/floating.h" /* extern */ -extern int sx, sy; /* screen geometry */ extern int wax, way, wah, waw; /* windowarea geometry */ extern Client *clients, *sel, *stack; /* global client list and stack */ extern Atom wmatom[WMLast], netatom[NetLast]; @@ -349,8 +348,8 @@ manage(Display * disp, DC *drawcontext, Window w, XWindowAttributes * wa, jdwm_c if(c->w == DisplayWidth(disp, DefaultScreen(disp)) && c->h == DisplayHeight(disp, DefaultScreen(disp))) { - c->x = sx; - c->y = sy; + c->x = 0; + c->y = 0; c->border = wa->border_width; } else @@ -443,10 +442,10 @@ resize(Client * c, int x, int y, int w, int h, Bool sizehints) x = DisplayWidth(c->display, DefaultScreen(c->display)) - w - 2 * c->border; if(y > DisplayHeight(c->display, DefaultScreen(c->display))) y = DisplayHeight(c->display, DefaultScreen(c->display)) - h - 2 * c->border; - if(x + w + 2 * c->border < sx) - x = sx; - if(y + h + 2 * c->border < sy) - y = sy; + if(x + w + 2 * c->border < 0) + x = 0; + if(y + h + 2 * c->border < 0) + y = 0; if(c->x != x || c->y != y || c->w != w || c->h != h) { c->x = wc.x = x; diff --git a/jdwm.c b/jdwm.c index f2c709318..08eca506e 100644 --- a/jdwm.c +++ b/jdwm.c @@ -18,7 +18,7 @@ #include "layout.h" #include "tag.h" -int sx, sy, wax, way, waw, wah; +int wax, way, waw, wah; Atom wmatom[WMLast], netatom[NetLast]; Client *clients = NULL; Client *sel = NULL; @@ -167,14 +167,12 @@ setup(Display *disp, jdwm_config *jdwmconf) XSelectInput(disp, DefaultRootWindow(disp), wa.event_mask); grabkeys(disp, jdwmconf); compileregs(jdwmconf); - /* geometry */ - sx = sy = 0; /* bar */ dc.h = jdwmconf->statusbar.height = dc.font.height + 2; wa.override_redirect = 1; wa.background_pixmap = ParentRelative; wa.event_mask = ButtonPressMask | ExposureMask; - jdwmconf->statusbar.window = XCreateWindow(disp, DefaultRootWindow(disp), sx, sy, DisplayWidth(disp, DefaultScreen(disp)), jdwmconf->statusbar.height, 0, + jdwmconf->statusbar.window = XCreateWindow(disp, DefaultRootWindow(disp), 0, 0, DisplayWidth(disp, DefaultScreen(disp)), jdwmconf->statusbar.height, 0, DefaultDepth(disp, DefaultScreen(disp)), CopyFromParent, DefaultVisual(disp, DefaultScreen(disp)), CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); @@ -216,8 +214,8 @@ updatebarpos(Display *disp, Statusbar statusbar) { XEvent ev; - wax = sx; - way = sy; + wax = 0; + way = 0; wah = DisplayHeight(disp, DefaultScreen(disp)); waw = DisplayWidth(disp, DefaultScreen(disp)); switch (statusbar.position) @@ -225,14 +223,14 @@ updatebarpos(Display *disp, Statusbar statusbar) default: wah -= statusbar.height; way += statusbar.height; - XMoveWindow(disp, statusbar.window, sx, sy); + XMoveWindow(disp, statusbar.window, 0, 0); break; case BarBot: wah -= statusbar.height; - XMoveWindow(disp, statusbar.window, sx, sy + wah); + XMoveWindow(disp, statusbar.window, 0, wah); break; case BarOff: - XMoveWindow(disp, statusbar.window, sx, sy - statusbar.height); + XMoveWindow(disp, statusbar.window, 0, 0 - statusbar.height); break; } XSync(disp, False);