diff options
Diffstat (limited to 'src/xselect.c')
| -rw-r--r-- | src/xselect.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/xselect.c b/src/xselect.c index de9386bd7d9..64c64fa0c76 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -1940,7 +1940,7 @@ x_handle_selection_notify (XSelectionEvent *event) | |||
| 1940 | static struct frame * | 1940 | static struct frame * |
| 1941 | frame_for_x_selection (Lisp_Object object) | 1941 | frame_for_x_selection (Lisp_Object object) |
| 1942 | { | 1942 | { |
| 1943 | Lisp_Object tail; | 1943 | Lisp_Object tail, frame; |
| 1944 | struct frame *f; | 1944 | struct frame *f; |
| 1945 | 1945 | ||
| 1946 | if (NILP (object)) | 1946 | if (NILP (object)) |
| @@ -1949,9 +1949,9 @@ frame_for_x_selection (Lisp_Object object) | |||
| 1949 | if (FRAME_X_P (f) && FRAME_LIVE_P (f)) | 1949 | if (FRAME_X_P (f) && FRAME_LIVE_P (f)) |
| 1950 | return f; | 1950 | return f; |
| 1951 | 1951 | ||
| 1952 | for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) | 1952 | FOR_EACH_FRAME (tail, frame) |
| 1953 | { | 1953 | { |
| 1954 | f = XFRAME (XCAR (tail)); | 1954 | f = XFRAME (frame); |
| 1955 | if (FRAME_X_P (f) && FRAME_LIVE_P (f)) | 1955 | if (FRAME_X_P (f) && FRAME_LIVE_P (f)) |
| 1956 | return f; | 1956 | return f; |
| 1957 | } | 1957 | } |
| @@ -1959,15 +1959,14 @@ frame_for_x_selection (Lisp_Object object) | |||
| 1959 | else if (TERMINALP (object)) | 1959 | else if (TERMINALP (object)) |
| 1960 | { | 1960 | { |
| 1961 | struct terminal *t = get_terminal (object, 1); | 1961 | struct terminal *t = get_terminal (object, 1); |
| 1962 | |||
| 1962 | if (t->type == output_x_window) | 1963 | if (t->type == output_x_window) |
| 1963 | { | 1964 | FOR_EACH_FRAME (tail, frame) |
| 1964 | for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) | 1965 | { |
| 1965 | { | 1966 | f = XFRAME (frame); |
| 1966 | f = XFRAME (XCAR (tail)); | 1967 | if (FRAME_LIVE_P (f) && f->terminal == t) |
| 1967 | if (FRAME_LIVE_P (f) && f->terminal == t) | 1968 | return f; |
| 1968 | return f; | 1969 | } |
| 1969 | } | ||
| 1970 | } | ||
| 1971 | } | 1970 | } |
| 1972 | else if (FRAMEP (object)) | 1971 | else if (FRAMEP (object)) |
| 1973 | { | 1972 | { |