aboutsummaryrefslogtreecommitdiffstats
path: root/src/xselect.c
diff options
context:
space:
mode:
authorEli Zaretskii2012-11-13 16:17:18 +0200
committerEli Zaretskii2012-11-13 16:17:18 +0200
commit3c4ca7155293ffc2d04708007131bcbc882d8913 (patch)
tree61787be8cd43b6fb3d5159852fbd186eea404de7 /src/xselect.c
parent5ade42a5114255c43117065494b96d480c1e1588 (diff)
parentc708524567662c8911c5ab2695acc7bda0383705 (diff)
downloademacs-3c4ca7155293ffc2d04708007131bcbc882d8913.tar.gz
emacs-3c4ca7155293ffc2d04708007131bcbc882d8913.zip
Merge from trunk.
Diffstat (limited to 'src/xselect.c')
-rw-r--r--src/xselect.c21
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)
1940static struct frame * 1940static struct frame *
1941frame_for_x_selection (Lisp_Object object) 1941frame_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 {