diff options
author | okan | 2011-06-24 06:52:23 +0000 |
---|---|---|
committer | okan | 2011-06-24 06:52:23 +0000 |
commit | 3e6eeaaf087fe881587a1a4a685fb1e460e76914 (patch) | |
tree | 3be61b609e2b233e01e19ac5af16febb3d98d4d5 /calmwm.c | |
parent | feff015aa1ac96d5c2ef8cc9b6413f4aa8ed2b8a (diff) | |
download | cwm-3e6eeaaf087fe881587a1a4a685fb1e460e76914.tar.gz |
add 'normal' cursor and shuffle the others we use to make a bit more
sense and to be slightly less un-expected. from Alexander Polakov.
re-use 'normal' cursor now instead XC_hand1 for menu selection. i
really wish X had real docs and made sense.
ok on earlier diff with '?' removed (but it's back now) oga@
Diffstat (limited to 'calmwm.c')
-rw-r--r-- | calmwm.c | 23 |
1 files changed, 12 insertions, 11 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.55 2011/06/24 05:58:51 okan Exp $ + * $OpenBSD: calmwm.c,v 1.56 2011/06/24 06:52:23 okan Exp $ */ #include <sys/param.h> @@ -35,11 +35,11 @@ Display *X_Dpy; -Cursor Cursor_move; -Cursor Cursor_resize; -Cursor Cursor_select; Cursor Cursor_default; +Cursor Cursor_move; +Cursor Cursor_normal; Cursor Cursor_question; +Cursor Cursor_resize; struct screen_ctx_q Screenq = TAILQ_HEAD_INITIALIZER(Screenq); struct client_ctx_q Clientq = TAILQ_HEAD_INITIALIZER(Clientq); @@ -120,6 +120,12 @@ x_setup(void) struct keybinding *kb; int i; + Cursor_default = XCreateFontCursor(X_Dpy, XC_X_cursor); + Cursor_move = XCreateFontCursor(X_Dpy, XC_fleur); + Cursor_normal = XCreateFontCursor(X_Dpy, XC_left_ptr); + Cursor_question = XCreateFontCursor(X_Dpy, XC_question_arrow); + Cursor_resize = XCreateFontCursor(X_Dpy, XC_bottom_right_corner); + for (i = 0; i < ScreenCount(X_Dpy); i++) { sc = xcalloc(1, sizeof(*sc)); x_setupscreen(sc, i); @@ -132,12 +138,6 @@ x_setup(void) */ TAILQ_FOREACH(kb, &Conf.keybindingq, entry) conf_grab(&Conf, kb); - - Cursor_move = XCreateFontCursor(X_Dpy, XC_fleur); - Cursor_resize = XCreateFontCursor(X_Dpy, XC_bottom_right_corner); - Cursor_select = XCreateFontCursor(X_Dpy, XC_hand1); - Cursor_default = XCreateFontCursor(X_Dpy, XC_X_cursor); - Cursor_question = XCreateFontCursor(X_Dpy, XC_question_arrow); } static void @@ -179,11 +179,12 @@ 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; XChangeWindowAttributes(X_Dpy, sc->rootwin, - CWEventMask, &rootattr); + CWEventMask|CWCursor, &rootattr); /* Deal with existing clients. */ XQueryTree(X_Dpy, sc->rootwin, &w0, &w1, &wins, &nwins); |