aboutsummaryrefslogtreecommitdiffstats
path: root/kbfunc.c
diff options
context:
space:
mode:
authorokan2015-05-21 00:37:04 +0000
committerokan2015-05-21 00:37:04 +0000
commita7aa847332ee80b281feeab6ce0544e48563d714 (patch)
treeed84317784292778e49b40c86332a5aa9a1bb182 /kbfunc.c
parentc61809c88c28d6ae5bcd9bbc2ec4e0ec2ea79bf9 (diff)
downloadcwm-a7aa847332ee80b281feeab6ce0544e48563d714.tar.gz
merge kbd and mouse grouptoggle
Diffstat (limited to '')
-rw-r--r--kbfunc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/kbfunc.c b/kbfunc.c
index e6798f9..1615788 100644
--- a/kbfunc.c
+++ b/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.
*
- * $OpenBSD: kbfunc.c,v 1.105 2015/01/19 14:54:16 okan Exp $
+ * $OpenBSD: kbfunc.c,v 1.106 2015/05/21 00:37:04 okan Exp $
*/
#include <sys/types.h>
@@ -435,9 +435,11 @@ kbfunc_client_nogroup(struct client_ctx *cc, union arg *arg)
void
kbfunc_client_grouptoggle(struct client_ctx *cc, union arg *arg)
{
- /* XXX for stupid X apps like xpdf and gvim */
- XGrabKeyboard(X_Dpy, cc->win, True,
- GrabModeAsync, GrabModeAsync, CurrentTime);
+ if (arg->i == 0) {
+ /* XXX for stupid X apps like xpdf and gvim */
+ XGrabKeyboard(X_Dpy, cc->win, True,
+ GrabModeAsync, GrabModeAsync, CurrentTime);
+ }
group_toggle_membership_enter(cc);
}