comparison src/frame-tty.c @ 223:2c611d1463a6 r20-4b10

Import from CVS: tag r20-4b10
author cvs
date Mon, 13 Aug 2007 10:10:54 +0200
parents 2d532a89d707
children c42ec1d1cded
comparison
equal deleted inserted replaced
222:aae4c8b01452 223:2c611d1463a6
67 } 67 }
68 68
69 static void 69 static void
70 tty_select_frame_if_unhidden (Lisp_Object frame) 70 tty_select_frame_if_unhidden (Lisp_Object frame)
71 { 71 {
72 if (FRAME_REPAINT_P (XFRAME (frame))) 72 if (FRAME_REPAINT_P (XFRAME (frame)))
73 select_frame_1 (frame); 73 select_frame_1 (frame);
74 } 74 }
75 75
76 static void 76 static void
77 tty_schedule_frame_select (struct frame *f) 77 tty_schedule_frame_select (struct frame *f)
78 { 78 {
158 158
159 static void 159 static void
160 tty_raise_frame_no_select (struct frame *f) 160 tty_raise_frame_no_select (struct frame *f)
161 { 161 {
162 struct frame *o; 162 struct frame *o;
163 struct device *d = XDEVICE (FRAME_DEVICE (f)); 163 Lisp_Object tail;
164 Lisp_Object frame_list = DEVICE_FRAME_LIST (d); 164
165 Lisp_Object tail = frame_list; 165 LIST_LOOP (tail, DEVICE_FRAME_LIST (XDEVICE (FRAME_DEVICE (f))))
166
167 while (CONSP (tail))
168 { 166 {
169 o = XFRAME (XCAR (tail)); 167 o = XFRAME (XCAR (tail));
170 if (o != f && FRAME_REPAINT_P(o)) 168 if (o != f && FRAME_REPAINT_P(o))
171 { 169 {
172 tty_make_frame_hidden (o); 170 tty_make_frame_hidden (o);
173 break; 171 break;
174 } 172 }
175 tail = XCDR (tail);
176 } 173 }
177 tty_make_frame_unhidden (f); 174 tty_make_frame_unhidden (f);
178 } 175 }
179 176
180 static void 177 static void
185 } 182 }
186 183
187 static void 184 static void
188 tty_lower_frame (struct frame *f) 185 tty_lower_frame (struct frame *f)
189 { 186 {
190 struct frame *o; 187 Lisp_Object frame_list = DEVICE_FRAME_LIST (XDEVICE (FRAME_DEVICE (f)));
191 struct device *d = XDEVICE (FRAME_DEVICE (f)); 188 Lisp_Object tail, new;
192 Lisp_Object frame_list = DEVICE_FRAME_LIST (d);
193 Lisp_Object tail;
194 Lisp_Object new;
195 189
196 if (!FRAME_REPAINT_P (f)) 190 if (!FRAME_REPAINT_P (f))
197 return; 191 return;
198 192
199 tail = frame_list; 193 LIST_LOOP (tail, frame_list)
200 while (CONSP (tail)) 194 {
201 { 195 if (f == XFRAME (XCAR (tail)))
202 o = XFRAME (XCAR (tail));
203 if (o == f)
204 break; 196 break;
205 tail = XCDR (tail); 197 }
206 } 198
207 199 /* To lower this frame, another frame has to be raised. Return if
208 /* to lower this frame another frame has to be raised. 200 there is no other frame. */
209 return if there is no other frame. */ 201 if (NILP (tail) && EQ(frame_list, tail))
210 if (!CONSP (tail) && EQ(frame_list, tail))
211 return; 202 return;
212 203
213 tty_make_frame_hidden (f); 204 tty_make_frame_hidden (f);
214 if (CONSP (XCDR (tail))) 205 if (CONSP (XCDR (tail)))
215 new = XCAR (XCDR (tail)); 206 new = XCAR (XCDR (tail));
220 } 211 }
221 212
222 static void 213 static void
223 tty_delete_frame (struct frame *f) 214 tty_delete_frame (struct frame *f)
224 { 215 {
225 struct device *d = XDEVICE (FRAME_DEVICE (f)); 216 struct device *d = XDEVICE (FRAME_DEVICE (f));
226 217
227 if (!NILP (DEVICE_SELECTED_FRAME (d))) 218 if (!NILP (DEVICE_SELECTED_FRAME (d)))
228 tty_raise_frame (XFRAME (DEVICE_SELECTED_FRAME (d))); 219 tty_raise_frame (XFRAME (DEVICE_SELECTED_FRAME (d)));
229 } 220 }
230 221
231 /************************************************************************/ 222 /************************************************************************/
232 /* initialization */ 223 /* initialization */
233 /************************************************************************/ 224 /************************************************************************/