diff options
| author | Richard M. Stallman | 1994-04-20 09:01:18 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-04-20 09:01:18 +0000 |
| commit | b2bd9b6ab1d17666ec257355a6e8df5864031638 (patch) | |
| tree | 8fb20b2ec457fc24bd498acf4358973b10cc3f49 /src | |
| parent | 5627c40e58b927f3337342d3b6d576647faee3d8 (diff) | |
| download | emacs-b2bd9b6ab1d17666ec257355a6e8df5864031638.tar.gz emacs-b2bd9b6ab1d17666ec257355a6e8df5864031638.zip | |
(XTread_socket): Delete the non-NEW_SELECTIONS code
and simplify the toolkit conditional for those cases.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 78 |
1 files changed, 16 insertions, 62 deletions
diff --git a/src/xterm.c b/src/xterm.c index e7ac474b339..0353250af7a 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -19,8 +19,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 19 | 19 | ||
| 20 | /* Xt features made by Fred Pierresteguy. */ | 20 | /* Xt features made by Fred Pierresteguy. */ |
| 21 | 21 | ||
| 22 | #define NEW_SELECTIONS | ||
| 23 | |||
| 24 | /* On 4.3 these lose if they come after xterm.h. */ | 22 | /* On 4.3 these lose if they come after xterm.h. */ |
| 25 | /* On HP-UX 8.0 signal.h loses if it comes after config.h. */ | 23 | /* On HP-UX 8.0 signal.h loses if it comes after config.h. */ |
| 26 | /* Putting these at the beginning seems to be standard for other .c files. */ | 24 | /* Putting these at the beginning seems to be standard for other .c files. */ |
| @@ -3469,26 +3467,20 @@ XTread_socket (sd, bufp, numchars, waitp, expected) | |||
| 3469 | } | 3467 | } |
| 3470 | break; | 3468 | break; |
| 3471 | 3469 | ||
| 3472 | #ifdef NEW_SELECTIONS | ||
| 3473 | case SelectionNotify: | 3470 | case SelectionNotify: |
| 3474 | #ifdef USE_X_TOOLKIT | 3471 | #ifdef USE_X_TOOLKIT |
| 3475 | if (x_window_to_frame (event.xselection.requestor)) | 3472 | if (! x_window_to_frame (event.xselection.requestor)) |
| 3476 | x_handle_selection_notify (&event); | ||
| 3477 | else | ||
| 3478 | goto OTHER; | 3473 | goto OTHER; |
| 3479 | #else /* not USE_X_TOOLKIT */ | ||
| 3480 | x_handle_selection_notify (&event); | ||
| 3481 | #endif /* not USE_X_TOOLKIT */ | 3474 | #endif /* not USE_X_TOOLKIT */ |
| 3475 | x_handle_selection_notify (&event); | ||
| 3482 | break; | 3476 | break; |
| 3483 | #endif /* NEW_SELECTIONS */ | ||
| 3484 | 3477 | ||
| 3485 | case SelectionClear: /* Someone has grabbed ownership. */ | 3478 | case SelectionClear: /* Someone has grabbed ownership. */ |
| 3486 | #ifdef NEW_SELECTIONS | ||
| 3487 | { | ||
| 3488 | #ifdef USE_X_TOOLKIT | 3479 | #ifdef USE_X_TOOLKIT |
| 3489 | if (x_window_to_frame (event.xselectionclear.window)) | 3480 | if (! x_window_to_frame (event.xselectionclear.window)) |
| 3490 | { | 3481 | goto OTHER; |
| 3491 | #endif /* USE_X_TOOLKIT */ | 3482 | #endif /* USE_X_TOOLKIT */ |
| 3483 | { | ||
| 3492 | XSelectionClearEvent *eventp = (XSelectionClearEvent *) &event; | 3484 | XSelectionClearEvent *eventp = (XSelectionClearEvent *) &event; |
| 3493 | 3485 | ||
| 3494 | if (numchars == 0) | 3486 | if (numchars == 0) |
| @@ -3502,26 +3494,15 @@ XTread_socket (sd, bufp, numchars, waitp, expected) | |||
| 3502 | 3494 | ||
| 3503 | count += 1; | 3495 | count += 1; |
| 3504 | numchars -= 1; | 3496 | numchars -= 1; |
| 3505 | #ifdef USE_X_TOOLKIT | ||
| 3506 | } | ||
| 3507 | else | ||
| 3508 | goto OTHER; | ||
| 3509 | #endif /* USE_X_TOOLKIT */ | ||
| 3510 | } | 3497 | } |
| 3511 | #else /* not NEW_SELECTIONS */ | ||
| 3512 | x_disown_selection (event.xselectionclear.window, | ||
| 3513 | event.xselectionclear.selection, | ||
| 3514 | event.xselectionclear.time); | ||
| 3515 | #endif /* not NEW_SELECTIONS */ | ||
| 3516 | break; | 3498 | break; |
| 3517 | 3499 | ||
| 3518 | case SelectionRequest: /* Someone wants our selection. */ | 3500 | case SelectionRequest: /* Someone wants our selection. */ |
| 3519 | #ifdef NEW_SELECTIONS | ||
| 3520 | { | ||
| 3521 | #ifdef USE_X_TOOLKIT | 3501 | #ifdef USE_X_TOOLKIT |
| 3522 | if (x_window_to_frame (event.xselectionrequest.owner)) | 3502 | if (!x_window_to_frame (event.xselectionrequest.owner)) |
| 3523 | { | 3503 | goto OTHER; |
| 3524 | #endif /* USE_X_TOOLKIT */ | 3504 | #endif /* USE_X_TOOLKIT */ |
| 3505 | { | ||
| 3525 | XSelectionRequestEvent *eventp = (XSelectionRequestEvent *) &event; | 3506 | XSelectionRequestEvent *eventp = (XSelectionRequestEvent *) &event; |
| 3526 | 3507 | ||
| 3527 | if (numchars == 0) | 3508 | if (numchars == 0) |
| @@ -3538,42 +3519,15 @@ XTread_socket (sd, bufp, numchars, waitp, expected) | |||
| 3538 | 3519 | ||
| 3539 | count += 1; | 3520 | count += 1; |
| 3540 | numchars -= 1; | 3521 | numchars -= 1; |
| 3541 | #ifdef USE_X_TOOLKIT | ||
| 3542 | } | ||
| 3543 | else | ||
| 3544 | goto OTHER; | ||
| 3545 | #endif /* USE_X_TOOLKIT */ | ||
| 3546 | } | 3522 | } |
| 3547 | #else /* not NEW_SELECTIONS */ | ||
| 3548 | x_answer_selection_request (event); | ||
| 3549 | #endif /* not NEW_SELECTIONS */ | ||
| 3550 | break; | 3523 | break; |
| 3551 | 3524 | ||
| 3552 | case PropertyNotify: | 3525 | case PropertyNotify: |
| 3553 | #ifdef NEW_SELECTIONS | ||
| 3554 | #ifdef USE_X_TOOLKIT | 3526 | #ifdef USE_X_TOOLKIT |
| 3555 | if (x_any_window_to_frame (event.xproperty.window)) | 3527 | if (!x_any_window_to_frame (event.xproperty.window)) |
| 3556 | x_handle_property_notify (&event); | ||
| 3557 | else | ||
| 3558 | goto OTHER; | 3528 | goto OTHER; |
| 3559 | #else /* not USE_X_TOOLKIT */ | ||
| 3560 | x_handle_property_notify (&event); | ||
| 3561 | #endif /* not USE_X_TOOLKIT */ | 3529 | #endif /* not USE_X_TOOLKIT */ |
| 3562 | #else /* not NEW_SELECTIONS */ | 3530 | x_handle_property_notify (&event); |
| 3563 | /* If we're being told about a root window property, then it's | ||
| 3564 | a cut buffer change. */ | ||
| 3565 | if (event.xproperty.window == ROOT_WINDOW) | ||
| 3566 | x_invalidate_cut_buffer_cache (&event.xproperty); | ||
| 3567 | |||
| 3568 | /* Otherwise, we're probably handling an incremental | ||
| 3569 | selection transmission. */ | ||
| 3570 | else | ||
| 3571 | { | ||
| 3572 | /* If we were to do this synchronously, there'd be no worry | ||
| 3573 | about re-selecting. */ | ||
| 3574 | x_send_incremental (event); | ||
| 3575 | } | ||
| 3576 | #endif /* not NEW_SELECTIONS */ | ||
| 3577 | break; | 3531 | break; |
| 3578 | 3532 | ||
| 3579 | case ReparentNotify: | 3533 | case ReparentNotify: |
| @@ -3593,11 +3547,9 @@ XTread_socket (sd, bufp, numchars, waitp, expected) | |||
| 3593 | SET_FRAME_GARBAGED (f); | 3547 | SET_FRAME_GARBAGED (f); |
| 3594 | } | 3548 | } |
| 3595 | else | 3549 | else |
| 3596 | { | 3550 | dumprectangle (x_window_to_frame (event.xexpose.window), |
| 3597 | dumprectangle (x_window_to_frame (event.xexpose.window), | 3551 | event.xexpose.x, event.xexpose.y, |
| 3598 | event.xexpose.x, event.xexpose.y, | 3552 | event.xexpose.width, event.xexpose.height); |
| 3599 | event.xexpose.width, event.xexpose.height); | ||
| 3600 | } | ||
| 3601 | } | 3553 | } |
| 3602 | else | 3554 | else |
| 3603 | { | 3555 | { |
| @@ -3705,6 +3657,8 @@ XTread_socket (sd, bufp, numchars, waitp, expected) | |||
| 3705 | break; | 3657 | break; |
| 3706 | 3658 | ||
| 3707 | case MapNotify: | 3659 | case MapNotify: |
| 3660 | /* We use x_top_window_to_frame because map events can come | ||
| 3661 | for subwindows and they don't mean that the frame is visible. */ | ||
| 3708 | f = x_top_window_to_frame (event.xmap.window); | 3662 | f = x_top_window_to_frame (event.xmap.window); |
| 3709 | if (f) | 3663 | if (f) |
| 3710 | { | 3664 | { |
| @@ -3718,7 +3672,7 @@ XTread_socket (sd, bufp, numchars, waitp, expected) | |||
| 3718 | #ifdef USE_X_TOOLKIT | 3672 | #ifdef USE_X_TOOLKIT |
| 3719 | goto OTHER; | 3673 | goto OTHER; |
| 3720 | #endif /* USE_X_TOOLKIT */ | 3674 | #endif /* USE_X_TOOLKIT */ |
| 3721 | break; | 3675 | break; |
| 3722 | 3676 | ||
| 3723 | /* Turn off processing if we become fully obscured. */ | 3677 | /* Turn off processing if we become fully obscured. */ |
| 3724 | case VisibilityNotify: | 3678 | case VisibilityNotify: |