diff options
-rw-r--r-- | calmwm.c | 6 | ||||
-rw-r--r-- | calmwm.h | 16 | ||||
-rw-r--r-- | kbfunc.c | 10 | ||||
-rw-r--r-- | menu.c | 12 | ||||
-rw-r--r-- | mousefunc.c | 10 | ||||
-rw-r--r-- | xutil.c | 4 |
6 files changed, 29 insertions, 29 deletions
@@ -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. * - * $OpenBSD: calmwm.c,v 1.56 2011/06/24 06:52:23 okan Exp $ + * $OpenBSD: calmwm.c,v 1.57 2011/07/23 13:09:11 okan Exp $ */ #include <sys/param.h> @@ -180,8 +180,8 @@ x_setupscreen(struct screen_ctx *sc, u_int which) xu_setwmname(sc); rootattr.cursor = Cursor_normal; - rootattr.event_mask = ChildMask|PropertyChangeMask|EnterWindowMask| - LeaveWindowMask|ColormapChangeMask|ButtonMask; + rootattr.event_mask = CHILDMASK|PropertyChangeMask|EnterWindowMask| + LeaveWindowMask|ColormapChangeMask|BUTTONMASK; XChangeWindowAttributes(X_Dpy, sc->rootwin, CWEventMask|CWCursor, &rootattr); @@ -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. * - * $OpenBSD: calmwm.h,v 1.134 2011/07/14 11:39:53 okan Exp $ + * $OpenBSD: calmwm.h,v 1.135 2011/07/23 13:09:11 okan Exp $ */ #ifndef _CALMWM_H_ @@ -43,15 +43,15 @@ #define CONFFILE ".cwmrc" #define WMNAME "CWM" -#define ChildMask (SubstructureRedirectMask|SubstructureNotifyMask) -#define ButtonMask (ButtonPressMask|ButtonReleaseMask) -#define MouseMask (ButtonMask|PointerMotionMask) -#define KeyMask (KeyPressMask|ExposureMask) -#define MenuMask (ButtonMask|ButtonMotionMask|ExposureMask| \ +#define CHILDMASK (SubstructureRedirectMask|SubstructureNotifyMask) +#define BUTTONMASK (ButtonPressMask|ButtonReleaseMask) +#define MOUSEMASK (BUTTONMASK|PointerMotionMask) +#define KEYMASK (KeyPressMask|ExposureMask) +#define MENUMASK (BUTTONMASK|ButtonMotionMask|ExposureMask| \ PointerMotionMask) -#define MenuGrabMask (ButtonMask|ButtonMotionMask|StructureNotifyMask|\ +#define MENUGRABMASK (BUTTONMASK|ButtonMotionMask|StructureNotifyMask|\ PointerMotionMask) -#define SearchMask (KeyPressMask|ExposureMask) +#define SEARCHMASK (KeyPressMask|ExposureMask) /* kb movement */ #define CWM_MOVE 0x0001 @@ -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. * - * $OpenBSD: kbfunc.c,v 1.55 2011/06/24 06:06:24 okan Exp $ + * $OpenBSD: kbfunc.c,v 1.56 2011/07/23 13:09:11 okan Exp $ */ #include <sys/param.h> @@ -49,8 +49,8 @@ kbfunc_client_raise(struct client_ctx *cc, union arg *arg) client_raise(cc); } -#define typemask (CWM_MOVE | CWM_RESIZE | CWM_PTRMOVE) -#define movemask (CWM_UP | CWM_DOWN | CWM_LEFT | CWM_RIGHT) +#define TYPEMASK (CWM_MOVE | CWM_RESIZE | CWM_PTRMOVE) +#define MOVEMASK (CWM_UP | CWM_DOWN | CWM_LEFT | CWM_RIGHT) void kbfunc_moveresize(struct client_ctx *cc, union arg *arg) { @@ -72,7 +72,7 @@ kbfunc_moveresize(struct client_ctx *cc, union arg *arg) amt = amt * 10; } - switch (flags & movemask) { + switch (flags & MOVEMASK) { case CWM_UP: my -= amt; break; @@ -86,7 +86,7 @@ kbfunc_moveresize(struct client_ctx *cc, union arg *arg) mx -= amt; break; } - switch (flags & typemask) { + switch (flags & TYPEMASK) { case CWM_MOVE: cc->geom.y += my; if (cc->geom.y + cc->geom.height < 0) @@ -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. * - * $OpenBSD: menu.c,v 1.29 2011/06/27 12:46:54 okan Exp $ + * $OpenBSD: menu.c,v 1.30 2011/07/23 13:09:11 okan Exp $ */ #include <sys/param.h> @@ -113,11 +113,11 @@ menu_filter(struct screen_ctx *sc, struct menu_q *menuq, char *prompt, ysave = mc.y; if (prompt == NULL) { - evmask = MenuMask; + evmask = MENUMASK; mc.promptstr[0] = '\0'; mc.list = 1; } else { - evmask = MenuMask | KeyMask; /* only accept keys if prompt */ + evmask = MENUMASK | KEYMASK; /* only accept keys if prompt */ snprintf(mc.promptstr, sizeof(mc.promptstr), "%s%s", prompt, PROMPT_SCHAR); snprintf(mc.dispstr, sizeof(mc.dispstr), "%s%s%s", mc.promptstr, @@ -140,7 +140,7 @@ menu_filter(struct screen_ctx *sc, struct menu_q *menuq, char *prompt, XSelectInput(X_Dpy, sc->menuwin, evmask); XMapRaised(X_Dpy, sc->menuwin); - if (xu_ptr_grab(sc->menuwin, MenuGrabMask, Cursor_question) < 0) { + if (xu_ptr_grab(sc->menuwin, MENUGRABMASK, Cursor_question) < 0) { XUnmapWindow(X_Dpy, sc->menuwin); return (NULL); } @@ -405,11 +405,11 @@ menu_handle_move(XEvent *e, struct menu_ctx *mc, struct screen_ctx *sc) XFillRectangle(X_Dpy, sc->menuwin, sc->gc, 0, font_height(sc) * mc->prev, mc->width, font_height(sc)); if (mc->entry != -1) { - xu_ptr_regrab(MenuGrabMask, Cursor_normal); + xu_ptr_regrab(MENUGRABMASK, Cursor_normal); XFillRectangle(X_Dpy, sc->menuwin, sc->gc, 0, font_height(sc) * mc->entry, mc->width, font_height(sc)); } else - xu_ptr_regrab(MenuGrabMask, Cursor_default); + xu_ptr_regrab(MENUGRABMASK, Cursor_default); } static struct menu * diff --git a/mousefunc.c b/mousefunc.c index c296d75..4acbc6d 100644 --- a/mousefunc.c +++ b/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. * - * $OpenBSD: mousefunc.c,v 1.30 2011/06/24 06:09:26 okan Exp $ + * $OpenBSD: mousefunc.c,v 1.31 2011/07/23 13:09:11 okan Exp $ */ #include <sys/param.h> @@ -88,14 +88,14 @@ mousefunc_window_resize(struct client_ctx *cc, void *arg) client_raise(cc); client_ptrsave(cc); - if (xu_ptr_grab(cc->win, MouseMask, Cursor_resize) < 0) + if (xu_ptr_grab(cc->win, MOUSEMASK, Cursor_resize) < 0) return; xu_ptr_setpos(cc->win, cc->geom.width, cc->geom.height); mousefunc_sweep_draw(cc); for (;;) { - XMaskEvent(X_Dpy, MouseMask|ExposureMask, &ev); + XMaskEvent(X_Dpy, MOUSEMASK|ExposureMask, &ev); switch (ev.type) { case Expose: @@ -144,13 +144,13 @@ mousefunc_window_move(struct client_ctx *cc, void *arg) if (cc->flags & CLIENT_FREEZE) return; - if (xu_ptr_grab(cc->win, MouseMask, Cursor_move) < 0) + if (xu_ptr_grab(cc->win, MOUSEMASK, Cursor_move) < 0) return; xu_ptr_getpos(cc->win, &px, &py); for (;;) { - XMaskEvent(X_Dpy, MouseMask|ExposureMask, &ev); + XMaskEvent(X_Dpy, MOUSEMASK|ExposureMask, &ev); switch (ev.type) { case Expose: @@ -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. * - * $OpenBSD: xutil.c,v 1.35 2011/05/11 13:53:51 okan Exp $ + * $OpenBSD: xutil.c,v 1.36 2011/07/23 13:09:11 okan Exp $ */ #include <sys/param.h> @@ -59,7 +59,7 @@ xu_btn_grab(Window win, int mask, u_int btn) int i; for (i = 0; i < nitems(ign_mods); i++) XGrabButton(X_Dpy, btn, (mask | ign_mods[i]), win, - False, ButtonMask, GrabModeAsync, + False, BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); } |