Hi,

here is another patch to CWM thats:
a) implement cyclegroup and rcyclegroup in mousefunc.c
b) set as default the mouse wheel to cycle group ( up = reverse, down =
normal)
I can`t set "mousebind" on root screen  using the cwmrc, so I setted as
default

Att,

Mosconi


Index: calmwm.h
===================================================================
RCS file: /cvs/xenocara/app/cwm/calmwm.h,v
retrieving revision 1.213
diff -p -r1.213 calmwm.h
*** calmwm.h    17 Jun 2013 17:11:10 -0000      1.213
--- calmwm.h    2 Jul 2013 23:06:55 -0000
*************** void                     mousefunc_window_lower(struct cl
*** 433,438 ****
--- 433,440 ----
  void                   mousefunc_window_move(struct client_ctx *, void *);
  void                   mousefunc_window_raise(struct client_ctx *, void
*);
  void                   mousefunc_window_resize(struct client_ctx *, void
*);
+ void                   mousefunc_client_cyclegroup(struct client_ctx *,
void *);
+ void                   mousefunc_client_rcyclegroup(struct client_ctx *,
void *);

  struct menu           *menu_filter(struct screen_ctx *, struct menu_q *,
                             char *, char *, int,
Index: conf.c
===================================================================
RCS file: /cvs/xenocara/app/cwm/conf.c,v
retrieving revision 1.137
diff -p -r1.137 conf.c
*** conf.c      23 Jun 2013 17:57:50 -0000      1.137
--- conf.c      2 Jul 2013 23:06:56 -0000
*************** m_binds[] = {
*** 207,212 ****
--- 207,214 ----
        { "1",          "menu_unhide" },
        { "2",          "menu_group" },
        { "3",          "menu_cmd" },
+       { "4",          "rcyclegroup" },
+       { "5",          "cyclegroup" },
        { "M-1",        "window_move" },
        { "CM-1",       "window_grouptoggle" },
        { "M-2",        "window_resize" },
*************** static struct {
*** 541,546 ****
--- 543,550 ----
        { "menu_group", mousefunc_menu_group, MOUSEBIND_CTX_ROOT },
        { "menu_unhide", mousefunc_menu_unhide, MOUSEBIND_CTX_ROOT },
        { "menu_cmd", mousefunc_menu_cmd, MOUSEBIND_CTX_ROOT },
+       { "cyclegroup", mousefunc_client_cyclegroup, MOUSEBIND_CTX_ROOT },
+       { "rcyclegroup", mousefunc_client_rcyclegroup, MOUSEBIND_CTX_ROOT },
  };

  static unsigned int mouse_btns[] = {
Index: mousefunc.c
===================================================================
RCS file: /cvs/xenocara/app/cwm/mousefunc.c,v
retrieving revision 1.53
diff -p -r1.53 mousefunc.c
*** mousefunc.c 17 Jun 2013 17:11:10 -0000      1.53
--- mousefunc.c 2 Jul 2013 23:06:56 -0000
*************** mousefunc_menu_group(struct client_ctx *
*** 208,213 ****
--- 208,225 ----
  }

  void
+ mousefunc_client_cyclegroup(struct client_ctx *cc, void *arg)
+ {
+   group_cycle(cc->sc, CWM_CYCLE );
+ }
+
+ void
+ mousefunc_client_rcyclegroup(struct client_ctx *cc, void *arg)
+ {
+   group_cycle(cc->sc, CWM_RCYCLE );
+ }
+
+ void
  mousefunc_menu_unhide(struct client_ctx *cc, void *arg)
  {
        struct screen_ctx       *sc = cc->sc;

Reply via email to