diff options
author | Gary Wong <gtw@gnu.org> | 2009-09-07 20:29:04 -0600 |
---|---|---|
committer | Gary Wong <gtw@gnu.org> | 2009-09-07 20:29:04 -0600 |
commit | e808018a3083edd12f487acf8314138c4a93ae41 (patch) | |
tree | 8ae6551bf1c47c59f9387149378777fb4ffe6eac | |
parent | 8476b64581e284b34c750a2a87bdea1fd727e981 (diff) |
Obtain RGB_COLOR_MAP property length in format units, not bytes.basic
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | decorate-core.c | 3 |
2 files changed, 6 insertions, 2 deletions
@@ -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 ) |