From 1eed217b1c54d32d3c9269be79c3cb298b4b2805 Mon Sep 17 00:00:00 2001 From: oga Date: Mon, 14 Jan 2008 15:21:10 +0000 Subject: Rewrite most of grab_menu in grab.c (it was partly 9wm code). This should work functionally the same, with a few simplifications. Changes: - we don't care if you're holding another button when you release the menu key if you don't want to select anything, move off the menu. - remove the hysteresis from the menu selection (before you had to move more than three pixels onto a new menu entry before it selected it) - simplify a lot of the selection code - kill dead code. - do what the XXX comment said and cache the screensize (i may tweak this later). As far as I can tell, the only code remaining from 9wm is the list of fonts in calmwm.c. Others appear to concur. ok marc@, looked over and tested by a few others. Reminders from okan@. --- calmwm.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'calmwm.c') diff --git a/calmwm.c b/calmwm.c index 7550bc8..5c91b2f 100644 --- a/calmwm.c +++ b/calmwm.c @@ -50,7 +50,6 @@ static char gray_bits[] = {0x02, 0x01}; /* List borrowed from 9wm/rio */ char *tryfonts[] = { "9x15bold", - "blit", "*-lucidatypewriter-bold-*-14-*-75-*", "*-lucidatypewriter-medium-*-12-*-75-*", "fixed", @@ -161,9 +160,7 @@ x_setup(char *display_name) Cursor_resize = XCreateFontCursor(X_Dpy, XC_bottom_right_corner); /* (used to be) XCreateFontCursor(X_Dpy, XC_hand1); */ Cursor_select = XCreateFontCursor(X_Dpy, XC_hand1); -/* Cursor_select = cursor_bigarrow(Curscreen); */ Cursor_default = XCreateFontCursor(X_Dpy, XC_X_cursor); -/* Cursor_default = cursor_bigarrow(Curscreen); */ Cursor_question = XCreateFontCursor(X_Dpy, XC_question_arrow); } @@ -288,9 +285,6 @@ x_setupscreen(struct screen_ctx *sc, u_int which) rootattr.event_mask = ChildMask|PropertyChangeMask|EnterWindowMask| LeaveWindowMask|ColormapChangeMask|ButtonMask; - /* Set the root cursor to a nice obnoxious arrow :-) */ -/* rootattr.cursor = cursor_bigarrow(sc); */ - XChangeWindowAttributes(X_Dpy, sc->rootwin, /* CWCursor| */CWEventMask, &rootattr); -- cgit 1.4.1