aboutsummaryrefslogtreecommitdiffstats
path: root/conf.c
diff options
context:
space:
mode:
authorokan2013-12-16 19:02:17 +0000
committerokan2013-12-16 19:02:17 +0000
commit9798372dada127b4294dd53e80501c05e544b86c (patch)
treed953b0b3e96eaa7da4a614d942438fb44ede06bc /conf.c
parent2f199b5ad84adda4a8b7d72b78529d68ec037786 (diff)
downloadcwm-9798372dada127b4294dd53e80501c05e544b86c.tar.gz
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@
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c7
1 files changed, 5 insertions, 2 deletions
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 <sys/param.h>
@@ -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",
};