- * a particular decoration. */
- uint64_t *motif_hints = (uint64_t *)xcb_get_property_value(prop);
-
- if (motif_border_style != NULL && motif_hints[0] & MWM_HINTS_DECORATIONS) {
- if (motif_hints[1] & MWM_DECOR_ALL || motif_hints[1] & MWM_DECOR_TITLE)
+ * a particular decoration. Notice that X11 (Xlib) often mentions 32-bit
+ * fields which in reality are implemented using unsigned long variables
+ * (64-bits long on amd64 for example). On the other hand,
+ * xcb_get_property_value() behaves strictly according to documentation,
+ * i.e. returns 32-bit data fields. */
+ uint32_t *motif_hints = (uint32_t *)xcb_get_property_value(prop);
+
+ if (motif_border_style != NULL &&
+ motif_hints[MWM_HINTS_FLAGS_FIELD] & MWM_HINTS_DECORATIONS) {
+ if (motif_hints[MWM_HINTS_DECORATIONS_FIELD] & MWM_DECOR_ALL ||
+ motif_hints[MWM_HINTS_DECORATIONS_FIELD] & MWM_DECOR_TITLE)