summaryrefslogtreecommitdiff
path: root/app/cwm/calmwm.h
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2013-12-16 19:02:18 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2013-12-16 19:02:18 +0000
commit6607b5d582214cfff74e2f83b584112c17932cd6 (patch)
tree7c3e4a97f0701f4d291e6fb1851239bf83c68112 /app/cwm/calmwm.h
parent235d74776abb4df5a96170b419044ae120b931dc (diff)
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 'app/cwm/calmwm.h')
-rw-r--r--app/cwm/calmwm.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/cwm/calmwm.h b/app/cwm/calmwm.h
index e765537e2..3ddb098fe 100644
--- a/app/cwm/calmwm.h
+++ b/app/cwm/calmwm.h
@@ -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: calmwm.h,v 1.236 2013/12/13 22:39:13 okan Exp $
+ * $OpenBSD: calmwm.h,v 1.237 2013/12/16 19:02:17 okan Exp $
*/
#ifndef _CALMWM_H_
@@ -138,7 +138,7 @@ struct client_ctx {
Window win;
Colormap colormap;
u_int bwidth; /* border width */
- struct geom geom, savegeom;
+ struct geom geom, savegeom, fullgeom;
struct {
long flags; /* defined hints */
int basew; /* desired width */
@@ -167,6 +167,7 @@ struct client_ctx {
#define CLIENT_WM_DELETE_WINDOW 0x0100
#define CLIENT_WM_TAKE_FOCUS 0x0200
#define CLIENT_URGENCY 0x0400
+#define CLIENT_FULLSCREEN 0x0800
#define CLIENT_HIGHLIGHT (CLIENT_GROUP | CLIENT_UNGROUP)
#define CLIENT_MAXFLAGS (CLIENT_VMAXIMIZED | CLIENT_HMAXIMIZED)
@@ -355,9 +356,10 @@ enum {
_NET_WM_DESKTOP,
_NET_CLOSE_WINDOW,
_NET_WM_STATE,
-#define _NET_WM_STATES_NITEMS 3
+#define _NET_WM_STATES_NITEMS 4
_NET_WM_STATE_MAXIMIZED_VERT,
_NET_WM_STATE_MAXIMIZED_HORZ,
+ _NET_WM_STATE_FULLSCREEN,
_NET_WM_STATE_DEMANDS_ATTENTION,
EWMH_NITEMS
};
@@ -380,6 +382,7 @@ void client_delete(struct client_ctx *);
void client_draw_border(struct client_ctx *);
struct client_ctx *client_find(Window);
void client_freeze(struct client_ctx *);
+void client_fullscreen(struct client_ctx *);
long client_get_wm_state(struct client_ctx *);
void client_getsizehints(struct client_ctx *);
void client_hide(struct client_ctx *);
@@ -445,6 +448,8 @@ void kbfunc_client_cyclegroup(struct client_ctx *,
union arg *);
void kbfunc_client_delete(struct client_ctx *, union arg *);
void kbfunc_client_freeze(struct client_ctx *, union arg *);
+void kbfunc_client_fullscreen(struct client_ctx *,
+ union arg *);
void kbfunc_client_group(struct client_ctx *, union arg *);
void kbfunc_client_grouponly(struct client_ctx *,
union arg *);