Example output:

_NET_DESKTOP_LAYOUT(CARDINAL):
                orientation: horizontal
                layout: 3 by 2
                starting corner: top left

Signed-off-by: Bert Wesarg <[email protected]>
---
 xprop.c |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/xprop.c b/xprop.c
index 25d626f..e3af508 100644
--- a/xprop.c
+++ b/xprop.c
@@ -383,6 +383,18 @@ typedef struct _propertyRec {
 "\t\twindow state: ?$0=0(Withdrawn)?$0=1(Normal)?$0=3(Iconic)\n"\
 "\t\ticon window: $1\n"
 
+#define _NET_DESKTOP_LAYOUT_DFORMAT     ":\n"\
+"\t\torientation: ?$0=0(horizontal)?$0=1(vertical)\n"\
+"\t\tlayout: $1 by $2\n"\
+"\t\tstarting corner: ?$#=4("\
+"?$3=0(top left)"\
+"?$3=1(top right)"\
+"?$3=2(bottom right)"\
+"?$3=3(bottom left)"\
+")"\
+"?$#=3(top left)"\
+"\n"
+
 static propertyRec windowPropTable[] = {
     {"ARC",            XA_ARC,         "16iiccii",   ARC_DFORMAT },
     {"ATOM",           XA_ATOM,         "32a",       0 },
@@ -410,7 +422,9 @@ static propertyRec windowPropTable[] = {
     {"WM_PROTOCOLS",           0,       "32a",       ": protocols  $0+\n"},
     {"WM_SIZE_HINTS",  XA_WM_SIZE_HINTS,"32mii",     WM_SIZE_HINTS_DFORMAT },
     {"_NET_WM_ICON",            0,       "32o",        0 },
-    {"WM_STATE",               0,       "32cx",      WM_STATE_DFORMAT}
+    {"WM_STATE",               0,       "32cx",      WM_STATE_DFORMAT},
+    {"_NET_DESKTOP_LAYOUT",    0,       "32c",      
_NET_DESKTOP_LAYOUT_DFORMAT},
+
 };
 #undef ARC_DFORMAT
 #undef RECTANGLE_DFORMAT
@@ -419,6 +433,7 @@ static propertyRec windowPropTable[] = {
 #undef WM_HINTS_DFORMAT
 #undef WM_SIZE_HINTS_DFORMAT
 #undef WM_STATE_DFORMAT
+#undef _NET_DESKTOP_LAYOUT_DFORMAT
 
 /* 
  * Font-specific mapping of property names to types:
-- 
1.7.7.759.gfc8c6

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to