From 9798372dada127b4294dd53e80501c05e544b86c Mon Sep 17 00:00:00 2001 From: okan Date: Mon, 16 Dec 2013 19:02:17 +0000 Subject: Implement support for EWMH's _NET_WM_STATE_FULLSCREEN hint. Since we already have a form of 'maximize', we need to differentiate between 'maximize' and the new 'fullscreen' mode. The 'maximize' mode will continue to honor gap but now *retains* the border, matching the 'vert/horz maximize' behaviour. The new 'fullscreen' mode supports and follows the _NET_WM_STATE_FULLSCREEN hint, allowing the client perform additional window modifications; in this mode, cwm(1) will *ignore* gap, remove borders and freeze(move/resize) the client. Additionally, 'fullscreen' mode will remember various combinations of previous states. * default keybinding changes: CM-f 'fullscreen', CM-m 'maximize' (re-map as desired). Positive feedback from a few, testing and ok sthen@ --- conf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'conf.c') diff --git a/conf.c b/conf.c index feaafa8..d65742f 100644 --- a/conf.c +++ b/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. * - * $OpenBSD: conf.c,v 1.151 2013/12/13 14:40:52 okan Exp $ + * $OpenBSD: conf.c,v 1.152 2013/12/16 19:02:17 okan Exp $ */ #include @@ -178,7 +178,8 @@ static struct { { "M-Right", "cyclegroup" }, { "M-Left", "rcyclegroup" }, { "CM-g", "grouptoggle" }, - { "CM-f", "maximize" }, + { "CM-f", "fullscreen" }, + { "CM-m", "maximize" }, { "CM-equal", "vmaximize" }, { "CMS-equal", "hmaximize" }, { "CMS-f", "freeze" }, @@ -376,6 +377,7 @@ static struct { { "rcycleingroup", kbfunc_client_cycle, KBFLAG_NEEDCLIENT, {.i = CWM_RCYCLE|CWM_INGROUP} }, { "grouptoggle", kbfunc_client_grouptoggle, KBFLAG_NEEDCLIENT, {0}}, + { "fullscreen", kbfunc_client_fullscreen, KBFLAG_NEEDCLIENT, {0} }, { "maximize", kbfunc_client_maximize, KBFLAG_NEEDCLIENT, {0} }, { "vmaximize", kbfunc_client_vmaximize, KBFLAG_NEEDCLIENT, {0} }, { "hmaximize", kbfunc_client_hmaximize, KBFLAG_NEEDCLIENT, {0} }, @@ -688,6 +690,7 @@ static char *ewmhints[] = { "_NET_WM_STATE", "_NET_WM_STATE_MAXIMIZED_VERT", "_NET_WM_STATE_MAXIMIZED_HORZ", + "_NET_WM_STATE_FULLSCREEN", "_NET_WM_STATE_DEMANDS_ATTENTION", }; -- cgit v1.2.3-2-gb3c3