diff -up tabbed_orig/config.def.h tabbed/config.def.h --- tabbed_orig/config.def.h 2012-12-03 20:53:58.198447147 +0100 +++ tabbed/config.def.h 2012-12-03 21:06:43.946637693 +0100 @@ -14,6 +14,7 @@ static const Bool foreground = True; #define MODKEY ControlMask static Key keys[] = { \ /* modifier key function argument */ + { 0, XK_F11, fullscreen, { 0 } }, { MODKEY|ShiftMask, XK_Return, focusonce, { 0 } }, { MODKEY|ShiftMask, XK_Return, spawn, { 0 } }, { MODKEY|ShiftMask, XK_l, rotate, { .i = +1 } }, diff -up tabbed_orig/tabbed.c tabbed/tabbed.c --- tabbed_orig/tabbed.c 2012-12-03 20:53:58.198447147 +0100 +++ tabbed/tabbed.c 2012-12-03 21:09:43.313574156 +0100 @@ -49,7 +49,7 @@ #define TEXTW(x) (textnw(x, strlen(x)) + dc.font.height) enum { ColFG, ColBG, ColLast }; /* color */ -enum { WMProtocols, WMDelete, WMName, XEmbed, WMLast }; /* default atoms */ +enum { WMProtocols, WMDelete, WMName, WMState, WMFullscreen, XEmbed, WMLast }; /* default atoms */ typedef union { int i; @@ -103,6 +103,7 @@ static void expose(const XEvent *e); static void focus(int c); static void focusin(const XEvent *e); static void focusonce(const Arg *arg); +static void fullscreen(const Arg *arg); static int getclient(Window w); static unsigned long getcolor(const char *colstr); static int getfirsttab(void); @@ -463,6 +464,20 @@ focusonce(const Arg *arg) { nextfocus = True; } +void +fullscreen(const Arg *arg) { + XEvent e; + + e.type = ClientMessage; + e.xclient.window = win; + e.xclient.message_type = wmatom[WMState]; + e.xclient.format = 32; + e.xclient.data.l[0] = 2; + e.xclient.data.l[1] = wmatom[WMFullscreen]; + e.xclient.data.l[2] = 0; + XSendEvent(dpy, root, False, SubstructureNotifyMask, &e); +} + int getclient(Window w) { int i; @@ -839,6 +854,8 @@ setup(void) { wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False); 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); /* init appearance */ wx = 0;