From a41a8537e1b830cd304d6866e42695f352432618 Mon Sep 17 00:00:00 2001 From: seanpringle Date: Sun, 2 Sep 2012 16:15:01 +1000 Subject: [PATCH] consider fullscreen windows to be in spot1. --- xoat.1 | 1 + xoat.c | 6 +++--- xoat.md | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/xoat.1 b/xoat.1 index 6f6bd3c..3a85b16 100644 --- a/xoat.1 +++ b/xoat.1 @@ -63,6 +63,7 @@ Close a window. .TP .B Mod4-f Toggle fullscreen. +While in fullscreen mode, an window is considered to be in tile 1. .RS .RE .TP diff --git a/xoat.c b/xoat.c index bc0abb3..fb337d4 100644 --- a/xoat.c +++ b/xoat.c @@ -457,9 +457,8 @@ Window spot_active(int spot, int mon, Window except) for (i = 0; i < wins.depth; i++) { client *o = wins.clients[i]; - if (o->window != except && o->manage - && INTERSECT(x + w/2, y + h/2, 1, 1, - o->attr.x, o->attr.y, o->attr.width, o->attr.height)) + if (o->window != except && o->manage && o->spot == spot + && INTERSECT(x + w/2, y + h/2, 1, 1, o->attr.x, o->attr.y, o->attr.width, o->attr.height)) { client_raise(o); client_active(o); @@ -798,6 +797,7 @@ void key_press(XKeyEvent *e) { client_add_state(c, atoms[_NET_WM_STATE_FULLSCREEN]); window_set_cardinal_prop(c->window, atoms[XOAT_SPOT], &spot, 1); + c->spot = SPOT1; } client_review(c); client_spot(c, c->spot, 1); diff --git a/xoat.md b/xoat.md index 1b2a120..76246d7 100644 --- a/xoat.md +++ b/xoat.md @@ -48,7 +48,7 @@ Mod4-Escape : Close a window. Mod4-f -: Toggle fullscreen. +: Toggle fullscreen. While in fullscreen mode, an window is considered to be in tile 1. Mod4-Right : Focus next monitor.