diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2008-01-14 15:21:11 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2008-01-14 15:21:11 +0000 |
commit | a337a2811cbcf399951e264c5041a0ecf29025ae (patch) | |
tree | b90c3f20bcdac503318a36aed8aa85336ac08408 /app/cwm/calmwm.h | |
parent | eeddaf3afaf6c9267e2170009e6929a5ff255171 (diff) |
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@.
Diffstat (limited to 'app/cwm/calmwm.h')
-rw-r--r-- | app/cwm/calmwm.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/cwm/calmwm.h b/app/cwm/calmwm.h index 7d2670f1d..a212218f7 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.17 2008/01/11 16:06:44 oga Exp $ + * $Id: calmwm.h,v 1.18 2008/01/14 15:21:10 oga Exp $ */ #ifndef _CALMWM_H_ @@ -79,6 +79,10 @@ struct screen_ctx { int altpersist; + int maxinitialised; + int xmax; + int ymax; + FILE *notifier; struct cycle_entry_q mruq; @@ -276,7 +280,6 @@ struct menu { char text[MENU_MAXENTRY + 1]; char print[MENU_MAXENTRY + 1]; void *ctx; - short lasthit; short dummy; }; @@ -399,7 +402,6 @@ int grab_drag(struct client_ctx *); void grab_menuinit(struct screen_ctx *); void *grab_menu(XButtonEvent *, struct menu_q *); void grab_label(struct client_ctx *); -void grab_exec(void); void xfree(void *); void *xmalloc(size_t); |