From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Werner LEMBERG Newsgroups: gmane.emacs.bugs Subject: bug#12360: 24.2.50; Crash in set_buffer_internal_1 Date: Thu, 06 Sep 2012 10:05:28 +0200 (CEST) Message-ID: <20120906.100528.84379604.wl@gnu.org> References: <20120905.190306.73334721.wl@gnu.org> <50484E9A.7090307@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Thu_Sep__6_10_05_28_2012_066)--" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1346918773 1654 80.91.229.3 (6 Sep 2012 08:06:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Sep 2012 08:06:13 +0000 (UTC) Cc: 12360@debbugs.gnu.org To: rudalics@gmx.at Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 06 10:06:15 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T9X6M-00086g-RX for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Sep 2012 10:06:15 +0200 Original-Received: from localhost ([::1]:60817 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9X6J-0004d6-6P for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Sep 2012 04:06:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36923) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9X66-0004bd-AQ for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 04:06:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9X60-0006mt-1Q for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 04:05:57 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60627) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9X5z-0006mo-TP for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 04:05:51 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T9X6A-0003hy-6G for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 04:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Werner LEMBERG Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Sep 2012 08:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12360 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12360-submit@debbugs.gnu.org id=B12360.134691874714234 (code B ref 12360); Thu, 06 Sep 2012 08:06:02 +0000 Original-Received: (at 12360) by debbugs.gnu.org; 6 Sep 2012 08:05:47 +0000 Original-Received: from localhost ([127.0.0.1]:41940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T9X5u-0003hV-OH for submit@debbugs.gnu.org; Thu, 06 Sep 2012 04:05:47 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:50199) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1T9X5r-0003hM-9Q for 12360@debbugs.gnu.org; Thu, 06 Sep 2012 04:05:46 -0400 Original-Received: (qmail invoked by alias); 06 Sep 2012 08:05:30 -0000 Original-Received: from 178-190-40-170.adsl.highway.telekom.at (EHLO localhost) [178.190.40.170] by mail.gmx.net (mp038) with SMTP; 06 Sep 2012 10:05:30 +0200 X-Authenticated: #54312696 X-Provags-ID: V01U2FsdGVkX1/fTOAzMaHfJLlM0mP9FXRWToJaENswhCyTCzpqdb 4QO5c0rMCZh5im In-Reply-To: <50484E9A.7090307@gmx.at> X-Mailer: Mew version 6.4rc1 on Emacs 24.2.50.2 / Mule 6.0 (HANACHIRUSATO) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:63829 Archived-At: ----Next_Part(Thu_Sep__6_10_05_28_2012_066)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit > Can you please update to revision 109888 on trunk? There have been a > few important changes in between. Updating to 109898 right now. BTW, here's an corrected version of your patch which applies cleanly. Werner ----Next_Part(Thu_Sep__6_10_05_28_2012_066)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="windowp-109898.diff" diff -aruN emacs.compiled.orig/src/buffer.c emacs.compiled/src/buffer.c --- emacs.compiled.orig/src/buffer.c 2012-09-06 09:52:34.000000000 +0200 +++ emacs.compiled/src/buffer.c 2012-09-06 09:49:55.000000000 +0200 @@ -1351,7 +1351,7 @@ A non-nil FLAG means mark the buffer modified. */) (Lisp_Object flag) { - Lisp_Object fn, buffer, window; + Lisp_Object fn, buffer; #ifdef CLASH_DETECTION /* If buffer becoming modified, lock the file. @@ -1401,8 +1401,7 @@ buffers without "modifying" buffers, or redisplay should be smarter about updating the `*' in mode lines. --gerd */ XSETBUFFER (buffer, current_buffer); - window = Fget_buffer_window (buffer, Qt); - if (WINDOWP (window)) + if (!NILP (Fget_buffer_window (buffer, Qt))) { ++update_mode_lines; current_buffer->prevent_redisplay_optimizations_p = 1; @@ -3179,7 +3178,7 @@ Lisp_Object window; window = Foverlay_get (overlay, Qwindow); - if (WINDOWP (window) && XWINDOW (window) != w) + if (WINDOW_LIVE_P (window) && XWINDOW (window) != w) continue; } @@ -3321,7 +3320,7 @@ if (endpos != pos && startpos != pos) continue; window = Foverlay_get (overlay, Qwindow); - if (WINDOWP (window) && XWINDOW (window) != w) + if (WINDOW_LIVE_P (window) && XWINDOW (window) != w) continue; if (startpos == pos && (str = Foverlay_get (overlay, Qbefore_string), STRINGP (str))) @@ -3349,7 +3348,7 @@ if (endpos != pos && startpos != pos) continue; window = Foverlay_get (overlay, Qwindow); - if (WINDOWP (window) && XWINDOW (window) != w) + if (WINDOW_LIVE_P (window) && XWINDOW (window) != w) continue; if (startpos == pos && (str = Foverlay_get (overlay, Qbefore_string), STRINGP (str))) diff -aruN emacs.compiled.orig/src/editfns.c emacs.compiled/src/editfns.c --- emacs.compiled.orig/src/editfns.c 2012-09-06 09:52:34.000000000 +0200 +++ emacs.compiled/src/editfns.c 2012-09-06 09:49:55.000000000 +0200 @@ -360,7 +360,7 @@ if (NILP (object)) XSETBUFFER (object, current_buffer); - else if (WINDOWP (object)) + else if (WINDOW_LIVE_P (object)) object = XWINDOW (object)->buffer; if (!BUFFERP (object)) diff -aruN emacs.compiled.orig/src/frame.c emacs.compiled/src/frame.c --- emacs.compiled.orig/src/frame.c 2012-09-06 09:52:34.000000000 +0200 +++ emacs.compiled/src/frame.c 2012-09-06 09:49:55.000000000 +0200 @@ -942,7 +942,7 @@ || FRAME_ICONIFIED_P (XFRAME (f))) return f; } - else if (WINDOWP (minibuf)) + else if (WINDOW_LIVE_P (minibuf)) { if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf) || EQ (WINDOW_FRAME (XWINDOW (minibuf)), f) @@ -1001,7 +1001,7 @@ if (! FRAME_MINIBUF_ONLY_P (XFRAME (f))) prev = f; } - else if (WINDOWP (minibuf)) + else if (WINDOW_LIVE_P (minibuf)) { if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf) || EQ (WINDOW_FRAME (XWINDOW (minibuf)), f) @@ -2141,7 +2141,7 @@ set_term_frame_name (f, val); } - if (EQ (prop, Qminibuffer) && WINDOWP (val)) + if (EQ (prop, Qminibuffer) && WINDOW_LIVE_P (val)) { if (! MINI_WINDOW_P (XWINDOW (val))) error ("Surrogate minibuffer windows must be minibuffer windows"); diff -aruN emacs.compiled.orig/src/keyboard.c emacs.compiled/src/keyboard.c --- emacs.compiled.orig/src/keyboard.c 2012-09-06 09:52:34.000000000 +0200 +++ emacs.compiled/src/keyboard.c 2012-09-06 09:49:55.000000000 +0200 @@ -3509,7 +3509,7 @@ frame = event->frame_or_window; if (CONSP (frame)) frame = XCAR (frame); - else if (WINDOWP (frame)) + else if (WINDOW_LIVE_P (frame)) frame = WINDOW_FRAME (XWINDOW (frame)); /* There are still some events that don't set this field. @@ -3726,7 +3726,7 @@ event.kind = HELP_EVENT; event.frame_or_window = frame; event.arg = object; - event.x = WINDOWP (window) ? window : frame; + event.x = WINDOW_LIVE_P (window) ? window : frame; event.y = help; event.code = pos; kbd_buffer_store_event (&event); @@ -4052,7 +4052,7 @@ clear_event (event); kbd_fetch_ptr = event + 1; - if (!WINDOWP (window)) + if (!WINDOW_LIVE_P (window)) window = Qnil; obj = Fcons (Qhelp_echo, list5 (frame, help, window, object, position)); @@ -4097,7 +4097,7 @@ frame = event->frame_or_window; if (CONSP (frame)) frame = XCAR (frame); - else if (WINDOWP (frame)) + else if (WINDOW_LIVE_P (frame)) frame = WINDOW_FRAME (XWINDOW (frame)); focus = FRAME_FOCUS_FRAME (XFRAME (frame)); @@ -5179,7 +5179,7 @@ ? window_from_coordinates (f, XINT (x), XINT (y), &part, 0) : Qnil; - if (WINDOWP (window)) + if (WINDOW_LIVE_P (window)) { /* It's a click in window WINDOW at frame coordinates (X,Y) */ struct window *w = XWINDOW (window); @@ -5608,7 +5608,7 @@ struct frame *f; int fuzz; - if (WINDOWP (event->frame_or_window)) + if (WINDOW_LIVE_P (event->frame_or_window)) f = XFRAME (XWINDOW (event->frame_or_window)->frame); else if (FRAMEP (event->frame_or_window)) f = XFRAME (event->frame_or_window); @@ -5776,7 +5776,7 @@ int symbol_num; int is_double; - if (WINDOWP (event->frame_or_window)) + if (WINDOW_LIVE_P (event->frame_or_window)) fr = XFRAME (XWINDOW (event->frame_or_window)->frame); else if (FRAMEP (event->frame_or_window)) fr = XFRAME (event->frame_or_window); @@ -9543,7 +9543,7 @@ read using the keymaps in the buffer clicked on, not the current buffer. If we're at the beginning of a key sequence, switch buffers. */ - if (WINDOWP (window) + if (WINDOW_LIVE_P (window) && BUFFERP (XWINDOW (window)->buffer) && XBUFFER (XWINDOW (window)->buffer) != current_buffer) { @@ -11235,7 +11235,7 @@ if (NILP (frame_or_window)) frame_or_window = selected_window; - if (WINDOWP (frame_or_window)) + if (WINDOW_LIVE_P (frame_or_window)) { struct window *w = decode_live_window (frame_or_window); diff -aruN emacs.compiled.orig/src/keymap.c emacs.compiled/src/keymap.c --- emacs.compiled.orig/src/keymap.c 2012-09-06 09:52:34.000000000 +0200 +++ emacs.compiled/src/keymap.c 2012-09-06 09:49:55.000000000 +0200 @@ -1559,7 +1559,7 @@ window = POSN_WINDOW (position); - if (WINDOWP (window) + if (WINDOW_LIVE_P (window) && BUFFERP (XWINDOW (window)->buffer) && XBUFFER (XWINDOW (window)->buffer) != current_buffer) { diff -aruN emacs.compiled.orig/src/textprop.c emacs.compiled/src/textprop.c --- emacs.compiled.orig/src/textprop.c 2012-09-06 09:52:34.000000000 +0200 +++ emacs.compiled/src/textprop.c 2012-09-06 09:49:55.000000000 +0200 @@ -584,7 +584,7 @@ if (NILP (object)) XSETBUFFER (object, current_buffer); - if (WINDOWP (object)) + if (WINDOW_LIVE_P (object)) { w = XWINDOW (object); object = w->buffer; diff -aruN emacs.compiled.orig/src/w32inevt.c emacs.compiled/src/w32inevt.c --- emacs.compiled.orig/src/w32inevt.c 2012-09-06 09:52:34.000000000 +0200 +++ emacs.compiled/src/w32inevt.c 2012-09-06 09:49:55.000000000 +0200 @@ -650,7 +650,7 @@ selected now, and the last mouse movement event was not in it. A minibuffer window will be selected iff it is active. */ - if (WINDOWP (mouse_window) + if (WINDOW_LIVE_P (mouse_window) && !EQ (mouse_window, last_mouse_window) && !EQ (mouse_window, selected_window)) { diff -aruN emacs.compiled.orig/src/w32term.c emacs.compiled/src/w32term.c --- emacs.compiled.orig/src/w32term.c 2012-09-06 09:52:34.000000000 +0200 +++ emacs.compiled/src/w32term.c 2012-09-06 09:50:51.000000000 +0200 @@ -3927,7 +3927,7 @@ w32_scroll_bar_handle_click (struct scroll_bar *bar, W32Msg *msg, struct input_event *emacs_event) { - if (! WINDOWP (bar->window)) + if (! WINDOW_LIVE_P (bar->window)) emacs_abort (); emacs_event->kind = SCROLL_BAR_CLICK_EVENT; @@ -4420,7 +4420,7 @@ selected now and last mouse movement event was not in it. Minibuffer window will be selected only when it is active. */ - if (WINDOWP (window) + if (WINDOW_LIVE_P (window) && !EQ (window, last_window) && !EQ (window, selected_window) /* For click-to-focus window managers diff -aruN emacs.compiled.orig/src/window.c emacs.compiled/src/window.c --- emacs.compiled.orig/src/window.c 2012-09-06 09:52:34.000000000 +0200 +++ emacs.compiled/src/window.c 2012-09-06 09:49:55.000000000 +0200 @@ -1973,7 +1973,7 @@ useful in connection with bug#12208). && XBUFFER (buf) != current_buffer */ /* This line helps to fix Horsley's testbug.el bug. */ - && !(WINDOWP (BVAR (b, last_selected_window)) + && !(WINDOW_LIVE_P (BVAR (b, last_selected_window)) && w != XWINDOW (BVAR (b, last_selected_window)) && EQ (buf, XWINDOW (BVAR (b, last_selected_window))->buffer))) temp_set_point_both (b, @@ -1984,7 +1984,7 @@ marker_byte_position (w->pointm), BUF_ZV_BYTE (b))); - if (WINDOWP (BVAR (b, last_selected_window)) + if (WINDOW_LIVE_P (BVAR (b, last_selected_window)) && w == XWINDOW (BVAR (b, last_selected_window))) bset_last_selected_window (b, Qnil); } @@ -2209,7 +2209,7 @@ candidate_p = 0; else if (MINI_WINDOW_P (w) && (EQ (minibuf, Qlambda) - || (WINDOWP (minibuf) && !EQ (minibuf, window)))) + || (WINDOW_LIVE_P (minibuf) && !EQ (minibuf, window)))) { /* If MINIBUF is `lambda' don't consider any mini-windows. If it is a window, consider only that one. */ @@ -2219,7 +2219,7 @@ candidate_p = 1; else if (NILP (all_frames)) { - eassert (WINDOWP (owindow)); + eassert (WINDOW_LIVE_P (owindow)); candidate_p = EQ (w->frame, XWINDOW (owindow)->frame); } else if (EQ (all_frames, Qvisible)) @@ -2248,7 +2248,7 @@ && (FRAME_TERMINAL (XFRAME (w->frame)) == FRAME_TERMINAL (XFRAME (selected_frame))); } - else if (WINDOWP (all_frames)) + else if (WINDOW_LIVE_P (all_frames)) candidate_p = (EQ (FRAME_MINIBUF_WINDOW (f), all_frames) || EQ (XWINDOW (all_frames)->frame, w->frame) || EQ (XWINDOW (all_frames)->frame, FRAME_FOCUS_FRAME (f))); @@ -2352,7 +2352,7 @@ { if (EQ (XCAR (list), window)) { - if (WINDOWP (candidate)) + if (WINDOW_LIVE_P (candidate)) break; } else if (candidate_window_p (XCAR (list), window, minibuf, @@ -2360,7 +2360,7 @@ candidate = XCAR (list); } - if (WINDOWP (candidate)) + if (WINDOW_LIVE_P (candidate)) window = candidate; } @@ -2584,7 +2584,7 @@ or Qt otherwise. */ /* Pick a window to start with. */ - if (WINDOWP (obj)) + if (WINDOW_LIVE_P (obj)) window = obj; else if (f) window = FRAME_SELECTED_WINDOW (f); @@ -3325,7 +3325,7 @@ return Qt; } - if (WINDOWP (object)) + if (WINDOW_LIVE_P (object)) { struct window *w = XWINDOW (object); mark_window_display_accurate (object, 0); @@ -5565,7 +5565,7 @@ the current-selected-window. So we have to be careful which point of the current-buffer we copy into old_point. */ if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer) - && WINDOWP (selected_window) + && WINDOW_LIVE_P (selected_window) && EQ (XWINDOW (selected_window)->buffer, new_current_buffer) && !EQ (selected_window, data->current_window)) old_point = XMARKER (XWINDOW (data->current_window)->pointm)->charpos; @@ -6507,7 +6507,7 @@ void *user_data) { /* delete_frame may set FRAME_ROOT_WINDOW (f) to Qnil. */ - if (WINDOWP (FRAME_ROOT_WINDOW (f))) + if (WINDOW_VALID_P (FRAME_ROOT_WINDOW (f))) foreach_window_1 (XWINDOW (FRAME_ROOT_WINDOW (f)), fn, user_data); } @@ -6546,7 +6546,7 @@ freeze_window_start (struct window *w, void *freeze_p) { if (MINI_WINDOW_P (w) - || (WINDOWP (selected_window) /* Can be nil in corner cases. */ + || (WINDOW_LIVE_P (selected_window) /* Can be nil in corner cases. */ && (w == XWINDOW (selected_window) || (MINI_WINDOW_P (XWINDOW (selected_window)) && ! NILP (Vminibuf_scroll_window) diff -aruN emacs.compiled.orig/src/xdisp.c emacs.compiled/src/xdisp.c --- emacs.compiled.orig/src/xdisp.c 2012-09-06 09:52:34.000000000 +0200 +++ emacs.compiled/src/xdisp.c 2012-09-06 09:49:55.000000000 +0200 @@ -2715,7 +2715,7 @@ /* Or show the region if we are in the mini-buffer and W is the window the mini-buffer refers to. */ || (MINI_WINDOW_P (XWINDOW (selected_window)) - && WINDOWP (minibuf_selected_window) + && WINDOW_LIVE_P (minibuf_selected_window) && w == XWINDOW (minibuf_selected_window)))) { ptrdiff_t markpos = marker_position (BVAR (current_buffer, mark)); @@ -10083,7 +10083,7 @@ Vdeactivate_mark = AREF (vector, 1); windows_or_buffers_changed = XFASTINT (AREF (vector, 2)); - if (WINDOWP (AREF (vector, 3))) + if (WINDOW_LIVE_P (AREF (vector, 3))) { struct window *w; Lisp_Object buffer, charpos, bytepos; @@ -10252,7 +10252,7 @@ resize_echo_area_exactly (void) { if (BUFFERP (echo_area_buffer[0]) - && WINDOWP (echo_area_window)) + && WINDOW_LIVE_P (echo_area_window)) { struct window *w = XWINDOW (echo_area_window); int resized_p; @@ -13067,7 +13067,8 @@ /* do_pending_window_change could change the selected_window due to frame resizing which makes the selected window too small. */ - if (WINDOWP (selected_window) && (w = XWINDOW (selected_window)) != sw) + if (WINDOW_LIVE_P (selected_window) + && (w = XWINDOW (selected_window)) != sw) { sw = w; reconsider_clip_changes (w, current_buffer); @@ -13346,7 +13347,7 @@ { do_pending_window_change (1); /* If selected_window changed, redisplay again. */ - if (WINDOWP (selected_window) + if (WINDOW_LIVE_P (selected_window) && (w = XWINDOW (selected_window)) != sw) goto retry; @@ -13657,7 +13658,8 @@ /* If we just did a pending size change, or have additional visible frames, or selected_window changed, redisplay again. */ if ((windows_or_buffers_changed && !pending) - || (WINDOWP (selected_window) && (w = XWINDOW (selected_window)) != sw)) + || (WINDOW_LIVE_P (selected_window) + && (w = XWINDOW (selected_window)) != sw)) goto retry; /* Clear the face and image caches. @@ -26361,7 +26363,7 @@ Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame)); /* Quickly resolve the easy cases. */ - if (!(WINDOWP (hlinfo->mouse_face_window) + if (!(WINDOW_LIVE_P (hlinfo->mouse_face_window) && XWINDOW (hlinfo->mouse_face_window) == w)) return 0; if (vpos < hlinfo->mouse_face_beg_row @@ -27663,7 +27665,7 @@ clear_mouse_face (hlinfo); /* Not on a window -> return. */ - if (!WINDOWP (window)) + if (!WINDOW_LIVE_P (window)) return; /* Reset help_echo_string. It will get recomputed below. */ diff -aruN emacs.compiled.orig/src/xfaces.c emacs.compiled/src/xfaces.c --- emacs.compiled.orig/src/xfaces.c 2012-09-06 09:52:34.000000000 +0200 +++ emacs.compiled/src/xfaces.c 2012-09-06 09:49:55.000000000 +0200 @@ -4309,7 +4309,7 @@ matrices as invalid because they will reference faces freed above. This function is also called when a frame is destroyed. In this case, the root window of F is nil. */ - if (WINDOWP (f->root_window)) + if (WINDOW_VALID_P (f->root_window)) { clear_current_matrices (f); ++windows_or_buffers_changed; diff -aruN emacs.compiled.orig/src/xterm.c emacs.compiled/src/xterm.c --- emacs.compiled.orig/src/xterm.c 2012-09-06 09:52:34.000000000 +0200 +++ emacs.compiled/src/xterm.c 2012-09-06 09:51:30.000000000 +0200 @@ -4228,7 +4228,7 @@ if (scroll_bar_p && strcmp (action_name, end_action) == 0 - && WINDOWP (window_being_scrolled)) + && WINDOW_LIVE_P (window_being_scrolled)) { struct window *w; @@ -4505,7 +4505,7 @@ { struct scroll_bar *bar = (struct scroll_bar *) user_data; bar->dragging = Qnil; - if (WINDOWP (window_being_scrolled)) + if (WINDOW_LIVE_P (window_being_scrolled)) { x_send_scroll_bar_event (window_being_scrolled, scroll_bar_end_scroll, 0, 0); @@ -5550,7 +5550,7 @@ static void x_scroll_bar_handle_click (struct scroll_bar *bar, XEvent *event, struct input_event *emacs_event) { - if (! WINDOWP (bar->window)) + if (! WINDOW_LIVE_P (bar->window)) emacs_abort (); emacs_event->kind = SCROLL_BAR_CLICK_EVENT; @@ -6775,7 +6775,7 @@ /* Window will be selected only when it is not selected now and last mouse movement event was not in it. Minibuffer window will be selected only when it is active. */ - if (WINDOWP (window) + if (WINDOW_LIVE_P (window) && !EQ (window, last_window) && !EQ (window, selected_window) /* For click-to-focus window managers ----Next_Part(Thu_Sep__6_10_05_28_2012_066)----