Regarding: Minor xprop bugs
Email: [EMAIL PROTECTED]
------------------------------------------------------------
XFree86 Version: XFree86-4.2.0
OS: Any
Area: xprop
Server: not server related
Video Card:
NA
Description:
1) If a property holds an array of WINDOWS's, only the first is shown by xprop.
2) As I read the man pages, "xprop -f XXX 32c -set XXX 123" should set XXX(CARDINAL) =
123. It does, however, set XXX(INTEGER) = 123.
Below, I have included a patch that makes things work for me:
# Minor xprop fixes:
#
# Chunk 1 gets all windows (not only the first) in a property holding a window
# list printed.
#
# Chunk2 makes "xprop -f PropName 32c ..." set a CARDINAL type property in
# stead of INTEGER.
#
--- xprop.c.org 2001-12-14 21:02:14.000000000 +0100
+++ xprop.c 2003-03-09 21:24:54.000000000 +0100
@@ -405,7 +405,7 @@
{"RECTANGLE", XA_RECTANGLE, "16iicc", RECTANGLE_DFORMAT },
{"RGB_COLOR_MAP", XA_RGB_COLOR_MAP,"32xcccccccxx",RGB_COLOR_MAP_DFORMAT},
{"STRING", XA_STRING, "8s", 0 },
- {"WINDOW", XA_WINDOW, "32x", ": window id # $0\n" },
+ {"WINDOW", XA_WINDOW, "32x", ": window id # $0+\n" },
{"VISUALID", XA_VISUALID, "32x", ": visual id # $0\n" },
{"WM_COLORMAP_WINDOWS", 0, "32x", ": window id # $0+\n"},
{"WM_COMMAND", XA_WM_COMMAND, "8s", " = { $0+ }\n" },
@@ -1378,12 +1378,16 @@
break;
}
case 'x':
- case 'c': {
+ type = XA_INTEGER;
+ goto case_unsigned;
+ case 'c':
+ type = XA_CARDINAL;
+ goto case_unsigned;
+ case_unsigned: {
unsigned long intvalue = strtoul(value, NULL, 0);
static unsigned char data8;
static unsigned short data16;
static unsigned long data32;
- type = XA_INTEGER;
switch (size) {
case 8:
data8 = intvalue; data = (unsigned char *) &data8; break;
Repeat By:
_______________________________________________
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86