comparison src/frame.c @ 165:5a88923fcbfe r20-3b9

Import from CVS: tag r20-3b9
author cvs
date Mon, 13 Aug 2007 09:44:42 +0200
parents 43dd3413c7c7
children 8eaf7971accc
comparison
equal deleted inserted replaced
164:4e0740e5aab2 165:5a88923fcbfe
1401 if (NILP (next) || EQ (next, frame)) 1401 if (NILP (next) || EQ (next, frame))
1402 next = next_frame_internal (frame, Qt, console, 1402 next = next_frame_internal (frame, Qt, console,
1403 called_from_delete_device); 1403 called_from_delete_device);
1404 if (NILP (next) || EQ (next, frame)) 1404 if (NILP (next) || EQ (next, frame))
1405 next = next_frame_internal (frame, Qt, Qt, called_from_delete_device); 1405 next = next_frame_internal (frame, Qt, Qt, called_from_delete_device);
1406
1407 /* if we haven't found another frame at this point
1408 then there aren't any. */
1406 if (NILP (next) || EQ (next, frame)) 1409 if (NILP (next) || EQ (next, frame))
1407 ; 1410 ;
1408 else if (EQ (frame, Fselected_frame (Qnil)))
1409 Fselect_frame (next);
1410 else 1411 else
1411 set_device_selected_frame (d, next); 1412 {
1413 int did_select = 0;
1414 /* if this is the global selected frame, select another one. */
1415 if (EQ (frame, Fselected_frame (Qnil)))
1416 {
1417 Fselect_frame (next);
1418 did_select = 1;
1419 }
1420 /*
1421 * If the new frame we just selected is on a different
1422 * device then we still need to change DEVICE_SELECTED_FRAME(d)
1423 * to a live frame, if there are any left on this device.
1424 */
1425 if (!EQ (device, FRAME_DEVICE(XFRAME(next))))
1426 {
1427 Lisp_Object next_f =
1428 next_frame_internal (frame, Qt, device,
1429 called_from_delete_device);
1430 if (NILP (next_f) || EQ (next_f, frame))
1431 ;
1432 else
1433 set_device_selected_frame (d, next_f);
1434 }
1435 else if (! did_select)
1436 set_device_selected_frame (d, next);
1437
1438 }
1412 } 1439 }
1413 1440
1414 /* Don't allow minibuf_window to remain on a deleted frame. */ 1441 /* Don't allow minibuf_window to remain on a deleted frame. */
1415 if (EQ (f->minibuffer_window, minibuf_window)) 1442 if (EQ (f->minibuffer_window, minibuf_window))
1416 { 1443 {