summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Wong <gtw@gnu.org>2009-09-07 20:29:04 -0600
committerGary Wong <gtw@gnu.org>2009-09-07 20:29:04 -0600
commite808018a3083edd12f487acf8314138c4a93ae41 (patch)
tree8ae6551bf1c47c59f9387149378777fb4ffe6eac
parent8476b64581e284b34c750a2a87bdea1fd727e981 (diff)
Obtain RGB_COLOR_MAP property length in format units, not bytes.basic
-rw-r--r--ChangeLog5
-rw-r--r--decorate-core.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 95aa383..09ae77f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-09-07 Gary Wong <gtw@gnu.org>
+
+ * decorate-core.c (handle_get_default_map): We want the property
+ length in format units, not bytes.
+
2009-08-28 Gary Wong <gtw@gnu.org>
* frame.c (recalc_size): Initialise feedback->u.feedback.
diff --git a/decorate-core.c b/decorate-core.c
index a9914b5..facc4d3 100644
--- a/decorate-core.c
+++ b/decorate-core.c
@@ -243,8 +243,7 @@ static void handle_get_default_map( unsigned int sequence, void *reply,
xcb_visualid_t visual_id;
uint32_t kill_id;
} *std_cmaps = xcb_get_property_value( prop );
- int num_cmaps = ( xcb_get_property_value_length( prop ) << 2 ) /
- sizeof *std_cmaps;
+ int num_cmaps = ( prop->value_len << 2 ) / sizeof *std_cmaps;
int i;
if( prop->format == 32 )