diff options
author | Markus Teich <markus.teich@stusta.mhn.de> | 2013-11-28 02:24:58 +0100 |
---|---|---|
committer | Christoph Lohmann <20h@r-36.net> | 2013-12-01 19:59:22 +0100 |
commit | 34baef933d0bba6dad20e1b9f24878b63756e443 (patch) | |
tree | 92dd7bb523b28fd2ccd5f6f7a6c63d05128aa1e2 /tabbed.c | |
parent | 14beaabe6ccbdf12546f31edf931e30cbe9c0c82 (diff) |
select tab with X ClientMessage event
Signed-off-by: Christoph Lohmann <20h@r-36.net>
Diffstat (limited to 'tabbed.c')
-rw-r--r-- | tabbed.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -48,7 +48,7 @@ enum { ColFG, ColBG, ColLast }; /* color */ enum { WMProtocols, WMDelete, WMName, WMState, WMFullscreen, - XEmbed, WMLast }; /* default atoms */ + XEmbed, WMSelectTab, WMLast }; /* default atoms */ typedef union { int i; @@ -237,6 +237,9 @@ clientmessage(const XEvent *e) { if(ev->message_type == wmatom[WMProtocols] && ev->data.l[0] == wmatom[WMDelete]) { running = False; + } else if(ev->message_type == wmatom[WMSelectTab]) { + Arg a = {.i = ev->data.l[0]}; + move(&a); } } @@ -892,8 +895,8 @@ setup(void) { wmatom[XEmbed] = XInternAtom(dpy, "_XEMBED", False); wmatom[WMName] = XInternAtom(dpy, "_NET_WM_NAME", False); wmatom[WMState] = XInternAtom(dpy, "_NET_WM_STATE", False); - wmatom[WMFullscreen] = XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", - False); + wmatom[WMFullscreen] = XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", False); + wmatom[WMSelectTab] = XInternAtom(dpy, "_TABBED_SELECT_TAB", False); /* init appearance */ wx = 0; |