summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/cwm/calmwm.h5
-rw-r--r--app/cwm/client.c6
-rw-r--r--app/cwm/conf.c6
-rw-r--r--app/cwm/kbfunc.c14
4 files changed, 17 insertions, 14 deletions
diff --git a/app/cwm/calmwm.h b/app/cwm/calmwm.h
index 9c656806f..78c0268aa 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.42 2008/05/19 12:56:58 okan Exp $
+ * $Id: calmwm.h,v 1.43 2008/05/19 15:17:50 oga Exp $
*/
#ifndef _CALMWM_H_
@@ -221,6 +221,9 @@ TAILQ_HEAD(winmatch_q, winmatch);
/* for cwm_exec */
#define CWM_EXEC_PROGRAM 0x1
#define CWM_EXEC_WM 0x2
+/* For alt-tab */
+#define CWM_CYCLE 0x0
+#define CWM_RCYCLE 0x1
#define KBFLAG_NEEDCLIENT 0x01
diff --git a/app/cwm/client.c b/app/cwm/client.c
index b869ab52f..5d9f18500 100644
--- a/app/cwm/client.c
+++ b/app/cwm/client.c
@@ -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: client.c,v 1.24 2008/05/19 12:56:58 okan Exp $
+ * $Id: client.c,v 1.25 2008/05/19 15:17:50 oga Exp $
*/
#include "headers.h"
@@ -620,10 +620,10 @@ client_cyclenext(int reverse)
if (again)
return (NULL); /* No windows visible. */
- goto done;
+ break;
}
}
-done:
+
/* reset when alt is released. XXX I hate this hack */
sc->altpersist = 1;
client_ptrsave(oldcc);
diff --git a/app/cwm/conf.c b/app/cwm/conf.c
index 7197449dc..3c4adb9f1 100644
--- a/app/cwm/conf.c
+++ b/app/cwm/conf.c
@@ -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: conf.c,v 1.32 2008/05/19 12:56:58 okan Exp $
+ * $Id: conf.c,v 1.33 2008/05/19 15:17:50 oga Exp $
*/
#include "headers.h"
@@ -209,8 +209,8 @@ struct {
{ "search", kbfunc_client_search, 0, 0 },
{ "menusearch", kbfunc_menu_search, 0, 0 },
{ "hide", kbfunc_client_hide, KBFLAG_NEEDCLIENT, 0 },
- { "cycle", kbfunc_client_cycle, 0, 0 },
- { "rcycle", kbfunc_client_rcycle, 0, 0 },
+ { "cycle", kbfunc_client_cycle, 0, (void *)CWM_CYCLE },
+ { "rcycle", kbfunc_client_cycle, 0, (void *)CWM_RCYCLE },
{ "label", kbfunc_client_label, KBFLAG_NEEDCLIENT, 0 },
{ "delete", kbfunc_client_delete, KBFLAG_NEEDCLIENT, 0 },
{ "group1", kbfunc_client_group, 0, (void *)1 },
diff --git a/app/cwm/kbfunc.c b/app/cwm/kbfunc.c
index ef5d0da09..7c98c379e 100644
--- a/app/cwm/kbfunc.c
+++ b/app/cwm/kbfunc.c
@@ -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: kbfunc.c,v 1.23 2008/05/19 12:56:58 okan Exp $
+ * $Id: kbfunc.c,v 1.24 2008/05/19 15:17:50 oga Exp $
*/
#include <paths.h>
@@ -176,13 +176,13 @@ kbfunc_menu_search(struct client_ctx *scratch, void *arg)
void
kbfunc_client_cycle(struct client_ctx *scratch, void *arg)
{
- client_cyclenext(0);
-}
+ struct screen_ctx *sc = screen_current();
-void
-kbfunc_client_rcycle(struct client_ctx *scratch, void *arg)
-{
- client_cyclenext(1);
+ /* XXX for X apps that ignore events */
+ XGrabKeyboard(X_Dpy, sc->rootwin, True,
+ GrabModeAsync, GrabModeAsync, CurrentTime);
+
+ client_cyclenext((int)arg);
}
void