changeset: 2550:55dde008aa6b
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Fri Oct 16 09:31:50 2009 -0400
files: cmd/wmii/ewmh.c
description:
Follow some more EWMH "MUST"s.
diff -r b8a999a5285e -r 55dde008aa6b cmd/wmii/ewmh.c
--- a/cmd/wmii/ewmh.c Fri Oct 16 08:56:08 2009 -0400
+++ b/cmd/wmii/ewmh.c Fri Oct 16 09:31:50 2009 -0400
@@ -41,14 +41,17 @@
long supported[] = {
/* Misc */
NET("SUPPORTED"),
- /* Root Properties */
+ /* Root Properties/Messages */
NET("ACTIVE_WINDOW"),
+ NET("CLOSE_WINDOW"),
NET("CURRENT_DESKTOP"),
/* Client Properties */
+ NET("FRAME_EXTENTS"),
+ NET("WM_DESKTOP"),
+ NET("WM_FULLSCREEN_MONITORS"),
NET("WM_NAME"),
+ NET("WM_STRUT"),
NET("WM_STRUT_PARTIAL"),
- NET("WM_DESKTOP"),
- NET("FRAME_EXTENTS"),
/* States */
NET("WM_STATE"),
STATE("DEMANDS_ATTENTION"),
@@ -377,6 +380,17 @@
focus(c, true);
return 1;
}else
+ if(msg == NET("CLOSE_WINDOW")) {
+ if(e->format != 32)
+ return -1;
+ Dprint(DEwmh, "\tsource: %ld\n", l[0]);
+ Dprint(DEwmh, "\twindow: 0x%lx\n", e->window);
+ c = win2client(e->window);
+ if(c == nil)
+ return 1;
+ client_kill(c, true);
+ return 1;
+ }else
if(msg == NET("CURRENT_DESKTOP")) {
if(e->format != 32)
return -1;
@@ -453,6 +467,14 @@
changeprop_long(&c->w, Net("WM_STATE"), "ATOM", state, i);
else
delproperty(&c->w, Net("WM_STATE"));
+
+ if(c->fullscreen >= 0)
+ changeprop_long(&c->w, Net("WM_FULLSCREEN_MONITORS"), "CARDINAL",
+ (long[]) { c->fullscreen, c->fullscreen,
+ c->fullscreen, c->fullscreen },
+ 4);
+ else
+ delproperty(&c->w, Net("WM_FULLSCREEN_MONITORS"));
}
/* Views */
Received on Fri Oct 16 2009 - 13:32:36 UTC
This archive was generated by hypermail 2.2.0 : Fri Oct 16 2009 - 13:36:05 UTC