diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2009-08-27 01:38:09 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2009-08-27 01:38:09 +0000 |
commit | ec081301ca468219829ddb473ef7dc3766d4ff81 (patch) | |
tree | 8ab60f60034cc13781f85c2fe93684cff72fa6c3 | |
parent | e79718e14d21acb40ef1d4cb5ca219c586fc6011 (diff) |
unroll the CCTOSC macro; from Thomas Pfaff
ok oga@
-rw-r--r-- | app/cwm/calmwm.h | 4 | ||||
-rw-r--r-- | app/cwm/client.c | 24 | ||||
-rw-r--r-- | app/cwm/mousefunc.c | 6 | ||||
-rw-r--r-- | app/cwm/xevents.c | 4 |
4 files changed, 18 insertions, 20 deletions
diff --git a/app/cwm/calmwm.h b/app/cwm/calmwm.h index ac32b5631..cd47ad2e4 100644 --- a/app/cwm/calmwm.h +++ b/app/cwm/calmwm.h @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: calmwm.h,v 1.97 2009/08/24 23:54:41 oga Exp $ + * $Id: calmwm.h,v 1.98 2009/08/27 01:38:08 okan Exp $ */ #ifndef _CALMWM_H_ @@ -491,8 +491,6 @@ XftFont *font_make(struct screen_ctx *, const char *); #define font_descent() Conf.DefaultFont->descent #define font_height() Conf.FontHeight -#define CCTOSC(cc) (cc->sc) - /* Externs */ extern Display *X_Dpy; diff --git a/app/cwm/client.c b/app/cwm/client.c index b9aaf6660..f0a2260bc 100644 --- a/app/cwm/client.c +++ b/app/cwm/client.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: client.c,v 1.63 2009/08/25 01:32:40 oga Exp $ + * $Id: client.c,v 1.64 2009/08/27 01:38:08 okan Exp $ */ #include "headers.h" @@ -126,7 +126,7 @@ client_new(Window win, struct screen_ctx *sc, int mapped) int client_delete(struct client_ctx *cc) { - struct screen_ctx *sc = CCTOSC(cc); + struct screen_ctx *sc = cc->sc; struct winname *wn; group_client_delete(cc); @@ -169,7 +169,7 @@ client_leave(struct client_ctx *cc) if (cc == NULL) return; - sc = CCTOSC(cc); + sc = cc->sc; xu_btn_ungrab(sc->rootwin, AnyModifier, Button1); } @@ -183,7 +183,7 @@ client_setactive(struct client_ctx *cc, int fg) if (cc == NULL) return; - sc = CCTOSC(cc); + sc = cc->sc; if (fg) { XInstallColormap(X_Dpy, cc->cmap); @@ -217,7 +217,7 @@ client_current(void) void client_maximize(struct client_ctx *cc) { - struct screen_ctx *sc = CCTOSC(cc); + struct screen_ctx *sc = cc->sc; int xmax = sc->xmax, ymax = sc->ymax; int x_org = 0, y_org = 0; @@ -257,7 +257,7 @@ calc: void client_vertmaximize(struct client_ctx *cc) { - struct screen_ctx *sc = CCTOSC(cc); + struct screen_ctx *sc = cc->sc; int y_org = 0, ymax = sc->ymax; if (cc->flags & CLIENT_VMAXIMIZED) { @@ -288,7 +288,7 @@ calc: void client_horizmaximize(struct client_ctx *cc) { - struct screen_ctx *sc = CCTOSC(cc); + struct screen_ctx *sc = cc->sc; int x_org = 0, xmax = sc->xmax; if (cc->flags & CLIENT_HMAXIMIZED) { @@ -411,7 +411,7 @@ client_unhide(struct client_ctx *cc) void client_draw_border(struct client_ctx *cc) { - struct screen_ctx *sc = CCTOSC(cc); + struct screen_ctx *sc = cc->sc; unsigned long pixel; if (cc->active) @@ -551,7 +551,7 @@ client_cycle(int reverse) static struct client_ctx * client_mrunext(struct client_ctx *cc) { - struct screen_ctx *sc = CCTOSC(cc); + struct screen_ctx *sc = cc->sc; struct client_ctx *ccc; return ((ccc = TAILQ_NEXT(cc, mru_entry)) != NULL ? @@ -561,7 +561,7 @@ client_mrunext(struct client_ctx *cc) static struct client_ctx * client_mruprev(struct client_ctx *cc) { - struct screen_ctx *sc = CCTOSC(cc); + struct screen_ctx *sc = cc->sc; struct client_ctx *ccc; return ((ccc = TAILQ_PREV(cc, cycle_entry_q, mru_entry)) != NULL ? @@ -571,7 +571,7 @@ client_mruprev(struct client_ctx *cc) static void client_placecalc(struct client_ctx *cc) { - struct screen_ctx *sc = CCTOSC(cc); + struct screen_ctx *sc = cc->sc; int xslack, yslack; if (cc->size->flags & USPosition) { @@ -648,7 +648,7 @@ client_mtf(struct client_ctx *cc) if (cc == NULL) return; - sc = CCTOSC(cc); + sc = cc->sc; /* Move to front. */ TAILQ_REMOVE(&sc->mruq, cc, mru_entry); diff --git a/app/cwm/mousefunc.c b/app/cwm/mousefunc.c index c40fb6a44..98fc85847 100644 --- a/app/cwm/mousefunc.c +++ b/app/cwm/mousefunc.c @@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: mousefunc.c,v 1.14 2009/08/25 01:32:40 oga Exp $ + * $Id: mousefunc.c,v 1.15 2009/08/27 01:38:08 okan Exp $ */ #include "headers.h" @@ -44,7 +44,7 @@ mousefunc_sweep_calc(struct client_ctx *cc, int x, int y, int mx, int my) static void mousefunc_sweep_draw(struct client_ctx *cc) { - struct screen_ctx *sc = CCTOSC(cc); + struct screen_ctx *sc = cc->sc; char asize[10]; /* fits "nnnnxnnnn\0" */ int width, height, width_size, width_name; @@ -72,7 +72,7 @@ mousefunc_window_resize(struct client_ctx *cc, void *arg) { XEvent ev; Time time = 0; - struct screen_ctx *sc = CCTOSC(cc); + struct screen_ctx *sc = cc->sc; int x = cc->geom.x, y = cc->geom.y; client_raise(cc); diff --git a/app/cwm/xevents.c b/app/cwm/xevents.c index d4be785f9..38efe679d 100644 --- a/app/cwm/xevents.c +++ b/app/cwm/xevents.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: xevents.c,v 1.42 2009/08/24 23:49:04 okan Exp $ + * $Id: xevents.c,v 1.43 2009/08/27 01:38:08 okan Exp $ */ /* @@ -125,7 +125,7 @@ xev_handle_configurerequest(XEvent *ee) XWindowChanges wc; if ((cc = client_find(e->window)) != NULL) { - sc = CCTOSC(cc); + sc = cc->sc; if (e->value_mask & CWWidth) cc->geom.width = e->width; |