From 26ec1f49cb852c04eb6266d64f1673859307adca Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 14 Dec 2012 10:38:50 -0500 Subject: [PATCH] * src/xdisp.c (select_frame_for_redisplay): Keep selected_window and selected_frame in sync. --- src/ChangeLog | 21 +++++++++++++-------- src/xdisp.c | 7 ++++--- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a1dc1c2adab..2e7c05e3d36 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-12-14 Stefan Monnier + + * xdisp.c (select_frame_for_redisplay): Keep selected_window and + selected_frame in sync. + 2012-12-14 Eli Zaretskii * w32.c (stat_worker): If w32_stat_get_owner_group is zero, do not @@ -5,8 +10,8 @@ security APIs. This is to make most callers of 'stat' and 'lstat', which don't need that information, much faster. - * dired.c (Ffile_attributes) [WINDOWSNT]: Set - w32_stat_get_owner_group to a non-zero value, to request accurate + * dired.c (Ffile_attributes) [WINDOWSNT]: + Set w32_stat_get_owner_group to a non-zero value, to request accurate owner and group information from 'lstat'. 2012-12-13 Paul Eggert @@ -138,8 +143,8 @@ * emacs.c (main): Call cache_system_info early in startup; we previously weren't calling it in Cygwin builds. - * Makefile.in (ntsource, WINDRES, W32_RES, W#@_RES_LINK): Teach - the autoconf build system how to compile a Windows resource file + * Makefile.in (ntsource, WINDRES, W32_RES, W#@_RES_LINK): + Teach the autoconf build system how to compile a Windows resource file and link it to Emacs. 2012-12-10 Dmitry Antipov @@ -686,8 +691,8 @@ (set_frame_menubar): Adjust user. * w32term.h (struct x_output): Drop outdated #if 0 code. (struct w32_output): Use bitfields for explicit_parent, - asked_for_visible and menubar_active members. Drop - unused pending_menu_activation member. + asked_for_visible and menubar_active members. + Drop unused pending_menu_activation member. * xterm.h (struct x_output): Drop outdated #if 0 code. Use bitfields for explicit_parent, asked_for_visible, has_been_visible and net_wm_state_hidden_seen members. @@ -780,8 +785,8 @@ * fileio.c (Fsubstitute_in_file_name, Ffile_name_directory) (Fexpand_file_name) [DOS_NT]: Pass encoded file name to dostounix_filename. Prevents crashes down the road, because - dostounix_filename assumes it gets a unibyte string. Reported by - Michel de Ruiter , see + dostounix_filename assumes it gets a unibyte string. + Reported by Michel de Ruiter , see http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00017.html 2012-11-20 Stefan Monnier diff --git a/src/xdisp.c b/src/xdisp.c index 3d7eda35092..4a47892a39f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -12966,6 +12966,7 @@ select_frame_for_redisplay (Lisp_Object frame) eassert (FRAMEP (frame) && FRAME_LIVE_P (XFRAME (frame))); selected_frame = frame; + selected_window = XFRAME (frame)->selected_window; do { for (tail = XFRAME (frame)->param_alist; @@ -12986,10 +12987,10 @@ select_frame_for_redisplay (Lisp_Object frame) deleted (by an X connection failure during redisplay, for example). */ static void -ensure_selected_frame (Lisp_Object old_frame) +ensure_selected_frame (Lisp_Object frame) { - if (!EQ (old_frame, selected_frame) && FRAME_LIVE_P (XFRAME (old_frame))) - select_frame_for_redisplay (old_frame); + if (!EQ (frame, selected_frame) && FRAME_LIVE_P (XFRAME (frame))) + select_frame_for_redisplay (frame); } #define STOP_POLLING \ -- 2.39.2