+void
+fullscreen_toggle(struct binding *bp, struct swm_region *r, union arg *args)
+{
+ struct ws_win *w = r->ws->focus;
+
+ /* suppress unused warning since var is needed */
+ (void)bp;
+ (void)args;
+
+ if (w == NULL)
+ return;
+
+ DNPRINTF(SWM_D_MISC, "fullscreen_toggle: win %#x\n", w->id);
+
+ ewmh_apply_flags(w, w->ewmh_flags ^ EWMH_F_FULLSCREEN);
+ ewmh_update_wm_state(w);
+
+ stack(r);
+
+ if (w == w->ws->focus)
+ focus_win(w);
+
+ center_pointer(r);
+ focus_flush();
+ DNPRINTF(SWM_D_MISC, "fullscreen_toggle: done\n");
+}