comparison src/window.c @ 31393:9cb95a7ee33e

(window_loop) <GET_LARGEST_WINDOW>: Fix bug making get-largest-window always return nil.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 05 Sep 2000 10:51:59 +0000
parents f390b90e3495
children 43566b0aec59
comparison
equal deleted inserted replaced
31392:1f97a090ba6d 31393:9cb95a7ee33e
1708 } 1708 }
1709 break; 1709 break;
1710 1710
1711 case GET_LARGEST_WINDOW: 1711 case GET_LARGEST_WINDOW:
1712 { 1712 {
1713 struct window *b;
1714
1715 /* Ignore dedicated windows and minibuffers. */ 1713 /* Ignore dedicated windows and minibuffers. */
1716 if (MINI_WINDOW_P (w) 1714 if (MINI_WINDOW_P (w) || !NILP (w->dedicated))
1717 || !NILP (w->dedicated)
1718 || NILP (best_window))
1719 break; 1715 break;
1720 1716
1721 b = XWINDOW (best_window); 1717 if (NILP (best_window))
1722 if (NILP (best_window)
1723 || (XFASTINT (w->height) * XFASTINT (w->width)
1724 > (XFASTINT (b->height) * XFASTINT (b->width))))
1725 best_window = window; 1718 best_window = window;
1719 else
1720 {
1721 struct window *b = XWINDOW (best_window);
1722 if (XFASTINT (w->height) * XFASTINT (w->width)
1723 > XFASTINT (b->height) * XFASTINT (b->width))
1724 best_window = window;
1725 }
1726 } 1726 }
1727 break; 1727 break;
1728 1728
1729 case UNSHOW_BUFFER: 1729 case UNSHOW_BUFFER:
1730 if (EQ (w->buffer, obj)) 1730 if (EQ (w->buffer, obj))