buf[0] = info->byteorder;
buf[1] = info->protocol;
+ if (info->byteorder != XM_BYTE_ORDER_CUR_FIRST)
+ {
+ SWAPCARD16 (info->table_index);
+ SWAPCARD16 (info->selection);
+ }
+
*((uint16_t *) (buf + 2)) = info->table_index;
*((uint32_t *) (buf + 4)) = info->selection;
XGrabServer (dpyinfo->display);
rc = XGetWindowProperty (dpyinfo->display, drag_window,
dpyinfo->Xatom_MOTIF_DRAG_TARGETS,
- /* Do larger values occur in practice? */
- 0L, 20000L, False,
+ 0L, LONG_MAX, False,
dpyinfo->Xatom_MOTIF_DRAG_TARGETS,
&actual_type, &actual_format, &nitems,
&bytes_remaining, &tmp_data) == Success;