diff options
Diffstat (limited to 'src/xselect.c')
| -rw-r--r-- | src/xselect.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/xselect.c b/src/xselect.c index 7479f245a77..7b91d6f69b9 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -2527,14 +2527,26 @@ are ignored. */) | |||
| 2527 | (Lisp_Object display, Lisp_Object dest, Lisp_Object from, Lisp_Object message_type, Lisp_Object format, Lisp_Object values) | 2527 | (Lisp_Object display, Lisp_Object dest, Lisp_Object from, Lisp_Object message_type, Lisp_Object format, Lisp_Object values) |
| 2528 | { | 2528 | { |
| 2529 | struct x_display_info *dpyinfo = check_x_display_info (display); | 2529 | struct x_display_info *dpyinfo = check_x_display_info (display); |
| 2530 | |||
| 2531 | CHECK_STRING (message_type); | ||
| 2532 | x_send_client_event(display, dest, from, | ||
| 2533 | XInternAtom (dpyinfo->display, | ||
| 2534 | SDATA (message_type), | ||
| 2535 | False), | ||
| 2536 | format, values); | ||
| 2537 | |||
| 2538 | return Qnil; | ||
| 2539 | } | ||
| 2540 | |||
| 2541 | void | ||
| 2542 | x_send_client_event (Lisp_Object display, Lisp_Object dest, Lisp_Object from, Atom message_type, Lisp_Object format, Lisp_Object values) | ||
| 2543 | { | ||
| 2544 | struct x_display_info *dpyinfo = check_x_display_info (display); | ||
| 2530 | Window wdest; | 2545 | Window wdest; |
| 2531 | XEvent event; | 2546 | XEvent event; |
| 2532 | Lisp_Object cons; | ||
| 2533 | int size; | ||
| 2534 | struct frame *f = check_x_frame (from); | 2547 | struct frame *f = check_x_frame (from); |
| 2535 | int to_root; | 2548 | int to_root; |
| 2536 | 2549 | ||
| 2537 | CHECK_STRING (message_type); | ||
| 2538 | CHECK_NUMBER (format); | 2550 | CHECK_NUMBER (format); |
| 2539 | CHECK_CONS (values); | 2551 | CHECK_CONS (values); |
| 2540 | 2552 | ||
| @@ -2579,13 +2591,9 @@ are ignored. */) | |||
| 2579 | if (wdest == 0) wdest = dpyinfo->root_window; | 2591 | if (wdest == 0) wdest = dpyinfo->root_window; |
| 2580 | to_root = wdest == dpyinfo->root_window; | 2592 | to_root = wdest == dpyinfo->root_window; |
| 2581 | 2593 | ||
| 2582 | for (cons = values, size = 0; CONSP (cons); cons = XCDR (cons), ++size) | ||
| 2583 | ; | ||
| 2584 | |||
| 2585 | BLOCK_INPUT; | 2594 | BLOCK_INPUT; |
| 2586 | 2595 | ||
| 2587 | event.xclient.message_type | 2596 | event.xclient.message_type = message_type; |
| 2588 | = XInternAtom (dpyinfo->display, SDATA (message_type), False); | ||
| 2589 | event.xclient.display = dpyinfo->display; | 2597 | event.xclient.display = dpyinfo->display; |
| 2590 | 2598 | ||
| 2591 | /* Some clients (metacity for example) expects sending window to be here | 2599 | /* Some clients (metacity for example) expects sending window to be here |
| @@ -2610,8 +2618,6 @@ are ignored. */) | |||
| 2610 | } | 2618 | } |
| 2611 | x_uncatch_errors (); | 2619 | x_uncatch_errors (); |
| 2612 | UNBLOCK_INPUT; | 2620 | UNBLOCK_INPUT; |
| 2613 | |||
| 2614 | return Qnil; | ||
| 2615 | } | 2621 | } |
| 2616 | 2622 | ||
| 2617 | 2623 | ||