comparison src/xselect.c @ 185:3d6bfa290dbd r20-3b19

Import from CVS: tag r20-3b19
author cvs
date Mon, 13 Aug 2007 09:55:28 +0200
parents 6075d714658b
children acd284d43ca1
comparison
equal deleted inserted replaced
184:bcd2674570bf 185:3d6bfa290dbd
944 944
945 static int 945 static int
946 expect_property_change (Display *display, Window window, 946 expect_property_change (Display *display, Window window,
947 Atom property, int state) 947 Atom property, int state)
948 { 948 {
949 struct prop_location *pl = (struct prop_location *) 949 struct prop_location *pl = xnew (struct prop_location);
950 xmalloc (sizeof (struct prop_location));
951 pl->tick = ++prop_location_tick; 950 pl->tick = ++prop_location_tick;
952 pl->display = display; 951 pl->display = display;
953 pl->window = window; 952 pl->window = window;
954 pl->property = property; 953 pl->property = property;
955 pl->desired_state = state; 954 pl->desired_state = state;
1392 return make_ext_string (data, size, 1391 return make_ext_string (data, size,
1393 type == DEVICE_XATOM_TEXT (d) || 1392 type == DEVICE_XATOM_TEXT (d) ||
1394 type == DEVICE_XATOM_COMPOUND_TEXT (d) 1393 type == DEVICE_XATOM_COMPOUND_TEXT (d)
1395 ? FORMAT_CTEXT : FORMAT_BINARY); 1394 ? FORMAT_CTEXT : FORMAT_BINARY);
1396 1395
1397 /* Convert a single atom to a Lisp_Symbol. Convert a set of atoms to 1396 /* Convert a single atom to a Lisp Symbol. Convert a set of atoms to
1398 a vector of symbols. 1397 a vector of symbols.
1399 */ 1398 */
1400 else if (type == XA_ATOM) 1399 else if (type == XA_ATOM)
1401 { 1400 {
1402 int i; 1401 int i;
1411 x_atom_to_symbol (d, ((Atom *) data) [i])); 1410 x_atom_to_symbol (d, ((Atom *) data) [i]));
1412 return v; 1411 return v;
1413 } 1412 }
1414 } 1413 }
1415 1414
1416 /* Convert a single 16 or small 32 bit number to a Lisp_Int. 1415 /* Convert a single 16 or small 32 bit number to a Lisp Int.
1417 If the number is > 16 bits, convert it to a cons of integers, 1416 If the number is > 16 bits, convert it to a cons of integers,
1418 16 bits in each half. 1417 16 bits in each half.
1419 */ 1418 */
1420 else if (format == 32 && size == sizeof (long)) 1419 else if (format == 32 && size == sizeof (long))
1421 return word_to_lisp (((unsigned long *) data) [0]); 1420 return word_to_lisp (((unsigned long *) data) [0]);
1555 (*(unsigned long **) data_ret) [0] = lisp_to_word (obj); 1554 (*(unsigned long **) data_ret) [0] = lisp_to_word (obj);
1556 if (NILP (type)) type = QINTEGER; 1555 if (NILP (type)) type = QINTEGER;
1557 } 1556 }
1558 else if (VECTORP (obj)) 1557 else if (VECTORP (obj))
1559 { 1558 {
1560 /* Lisp_Vectors may represent a set of ATOMs; 1559 /* Lisp Vectors may represent a set of ATOMs;
1561 a set of 16 or 32 bit INTEGERs; 1560 a set of 16 or 32 bit INTEGERs;
1562 or a set of ATOM_PAIRs (represented as [[A1 A2] [A3 A4] ...] 1561 or a set of ATOM_PAIRs (represented as [[A1 A2] [A3 A4] ...]
1563 */ 1562 */
1564 int i; 1563 int i;
1565 1564