aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1993-05-30 02:44:11 +0000
committerRichard M. Stallman1993-05-30 02:44:11 +0000
commit9c394f17ff24b024b0bbaa1460903df61b55d6c5 (patch)
treefe5a65c0586b530db24c5ef33480f44166105325 /src
parent8583db5803f0bb54200a3558b6dffbee9eaeaf68 (diff)
downloademacs-9c394f17ff24b024b0bbaa1460903df61b55d6c5.tar.gz
emacs-9c394f17ff24b024b0bbaa1460903df61b55d6c5.zip
(Ficonify_frame, Fmake_frame_invisible):
Select some other frame. Move minibuffer off this frame. (Fhandle_switch_frame): Don't call Ffocus_frame. (Fredirect_frame_focus): Call Ffocus_frame here.
Diffstat (limited to 'src')
-rw-r--r--src/frame.c40
1 files changed, 31 insertions, 9 deletions
diff --git a/src/frame.c b/src/frame.c
index d2e5b081281..93d62cfb83b 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -391,15 +391,6 @@ to that frame.")
391 last_nonminibuf_frame = selected_frame; 391 last_nonminibuf_frame = selected_frame;
392 392
393 Fselect_window (XFRAME (frame)->selected_window); 393 Fselect_window (XFRAME (frame)->selected_window);
394
395 /* I think this should be done with a hook. */
396#ifdef HAVE_X_WINDOWS
397 if (FRAME_X_P (XFRAME (frame))
398 && NILP (no_enter))
399 {
400 Ffocus_frame (frame);
401 }
402#endif
403 choose_minibuf_frame (); 394 choose_minibuf_frame ();
404 395
405 /* We want to make sure that the next event generates a frame-switch 396 /* We want to make sure that the next event generates a frame-switch
@@ -832,6 +823,18 @@ If omitted, FRAME defaults to the currently selected frame.")
832 823
833 CHECK_LIVE_FRAME (frame, 0); 824 CHECK_LIVE_FRAME (frame, 0);
834 825
826 /* Don't let the frame remain selected. */
827 if (XFRAME (frame) == selected_frame)
828 Fhandle_switch_frame (next_frame (frame, Qt), Qnil);
829
830 /* Don't allow minibuf_window to remain on a deleted frame. */
831 if (EQ (XFRAME (frame)->minibuffer_window, minibuf_window))
832 {
833 Fset_window_buffer (selected_frame->minibuffer_window,
834 XWINDOW (minibuf_window)->buffer);
835 minibuf_window = selected_frame->minibuffer_window;
836 }
837
835 /* I think this should be done with a hook. */ 838 /* I think this should be done with a hook. */
836#ifdef HAVE_X_WINDOWS 839#ifdef HAVE_X_WINDOWS
837 if (FRAME_X_P (XFRAME (frame))) 840 if (FRAME_X_P (XFRAME (frame)))
@@ -853,6 +856,18 @@ If omitted, FRAME defaults to the currently selected frame.")
853 856
854 CHECK_LIVE_FRAME (frame, 0); 857 CHECK_LIVE_FRAME (frame, 0);
855 858
859 /* Don't let the frame remain selected. */
860 if (XFRAME (frame) == selected_frame)
861 Fhandle_switch_frame (next_frame (frame, Qt), Qnil);
862
863 /* Don't allow minibuf_window to remain on a deleted frame. */
864 if (EQ (XFRAME (frame)->minibuffer_window, minibuf_window))
865 {
866 Fset_window_buffer (selected_frame->minibuffer_window,
867 XWINDOW (minibuf_window)->buffer);
868 minibuf_window = selected_frame->minibuffer_window;
869 }
870
856 /* I think this should be done with a hook. */ 871 /* I think this should be done with a hook. */
857#ifdef HAVE_X_WINDOWS 872#ifdef HAVE_X_WINDOWS
858 if (FRAME_X_P (XFRAME (frame))) 873 if (FRAME_X_P (XFRAME (frame)))
@@ -971,6 +986,13 @@ The redirection lasts until `redirect-frame-focus' is called to change it.")
971 986
972 XFRAME (frame)->focus_frame = focus_frame; 987 XFRAME (frame)->focus_frame = focus_frame;
973 988
989 /* I think this should be done with a hook. */
990#ifdef HAVE_X_WINDOWS
991 if (!NILP (focus_frame) && ! EQ (focus_frame, frame)
992 && FRAME_X_P (XFRAME (focus_frame)))
993 Ffocus_frame (focus_frame);
994#endif
995
974 if (frame_rehighlight_hook) 996 if (frame_rehighlight_hook)
975 (*frame_rehighlight_hook) (); 997 (*frame_rehighlight_hook) ();
976 998