aboutsummaryrefslogtreecommitdiffstats
path: root/src/frame.c
diff options
context:
space:
mode:
authorDmitry Antipov2013-01-24 09:41:28 +0400
committerDmitry Antipov2013-01-24 09:41:28 +0400
commitedfa7fa092c303265edeb2a0b530463cdfe63ab7 (patch)
tree509264878099f61ea1290ca65f93401a1bdf9926 /src/frame.c
parent5ad86e34d86173f6495b38336d377de5b69da853 (diff)
downloademacs-edfa7fa092c303265edeb2a0b530463cdfe63ab7.tar.gz
emacs-edfa7fa092c303265edeb2a0b530463cdfe63ab7.zip
Drop async_visible and async_iconified fields of struct frame.
This is possible because async input is gone; for details, see http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00734.html. * frame.h (struct frame): Remove async_visible and async_iconified members, convert garbaged to unsigned bitfield. Adjust comments. (FRAME_SAMPLE_VISIBILITY): Remove. Adjust all users. (SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED): New macros. * frame.c, gtkutil.c, term.c, w32fns.c, window.c, xdisp.c: Consistently use SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED, FRAME_VISIBLE_P and FRAME_ICONIFIED_P macros where appropriate. * w32term.c: Ditto. (w32_read_socket): Save iconified state to generate DEICONIFY_EVENT properly. Likewise for obscured. * xterm.c: Ditto. (handle_one_xevent): Save visible state go generate ICONIFY_EVENT properly. * nsterm.m: Ditto. (windowDidDeminiaturize): Generate DEICONIFY_EVENT.
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c30
1 files changed, 9 insertions, 21 deletions
diff --git a/src/frame.c b/src/frame.c
index 11886783e4c..9c26af819bc 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -500,8 +500,7 @@ make_initial_frame (void)
500 tty_frame_count = 1; 500 tty_frame_count = 1;
501 fset_name (f, build_pure_c_string ("F1")); 501 fset_name (f, build_pure_c_string ("F1"));
502 502
503 f->visible = 1; 503 SET_FRAME_VISIBLE (f, 1);
504 f->async_visible = 1;
505 504
506 f->output_method = terminal->type; 505 f->output_method = terminal->type;
507 f->terminal = terminal; 506 f->terminal = terminal;
@@ -540,8 +539,8 @@ make_terminal_frame (struct terminal *terminal)
540 539
541 fset_name (f, make_formatted_string (name, "F%"pMd, ++tty_frame_count)); 540 fset_name (f, make_formatted_string (name, "F%"pMd, ++tty_frame_count));
542 541
543 f->visible = 1; /* FRAME_SET_VISIBLE wd set frame_garbaged. */ 542 SET_FRAME_VISIBLE (f, 1);
544 f->async_visible = 1; /* Don't let visible be cleared later. */ 543
545 f->terminal = terminal; 544 f->terminal = terminal;
546 f->terminal->reference_count++; 545 f->terminal->reference_count++;
547#ifdef MSDOS 546#ifdef MSDOS
@@ -565,7 +564,7 @@ make_terminal_frame (struct terminal *terminal)
565 /* Set the top frame to the newly created frame. */ 564 /* Set the top frame to the newly created frame. */
566 if (FRAMEP (FRAME_TTY (f)->top_frame) 565 if (FRAMEP (FRAME_TTY (f)->top_frame)
567 && FRAME_LIVE_P (XFRAME (FRAME_TTY (f)->top_frame))) 566 && FRAME_LIVE_P (XFRAME (FRAME_TTY (f)->top_frame)))
568 XFRAME (FRAME_TTY (f)->top_frame)->async_visible = 2; /* obscured */ 567 SET_FRAME_VISIBLE (XFRAME (FRAME_TTY (f)->top_frame), 2); /* obscured */
569 568
570 FRAME_TTY (f)->top_frame = frame; 569 FRAME_TTY (f)->top_frame = frame;
571 570
@@ -806,8 +805,8 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor
806 { 805 {
807 if (FRAMEP (FRAME_TTY (XFRAME (frame))->top_frame)) 806 if (FRAMEP (FRAME_TTY (XFRAME (frame))->top_frame))
808 /* Mark previously displayed frame as now obscured. */ 807 /* Mark previously displayed frame as now obscured. */
809 XFRAME (FRAME_TTY (XFRAME (frame))->top_frame)->async_visible = 2; 808 SET_FRAME_VISIBLE (XFRAME (FRAME_TTY (XFRAME (frame))->top_frame), 2);
810 XFRAME (frame)->async_visible = 1; 809 SET_FRAME_VISIBLE (XFRAME (frame), 1);
811 FRAME_TTY (XFRAME (frame))->top_frame = frame; 810 FRAME_TTY (XFRAME (frame))->top_frame = frame;
812 } 811 }
813 812
@@ -914,7 +913,6 @@ candidate_frame (Lisp_Object candidate, Lisp_Object frame, Lisp_Object minibuf)
914 } 913 }
915 else if (EQ (minibuf, Qvisible)) 914 else if (EQ (minibuf, Qvisible))
916 { 915 {
917 FRAME_SAMPLE_VISIBILITY (c);
918 if (FRAME_VISIBLE_P (c)) 916 if (FRAME_VISIBLE_P (c))
919 return candidate; 917 return candidate;
920 } 918 }
@@ -928,7 +926,6 @@ candidate_frame (Lisp_Object candidate, Lisp_Object frame, Lisp_Object minibuf)
928 } 926 }
929 else if (XFASTINT (minibuf) == 0) 927 else if (XFASTINT (minibuf) == 0)
930 { 928 {
931 FRAME_SAMPLE_VISIBILITY (c);
932 if (FRAME_VISIBLE_P (c) || FRAME_ICONIFIED_P (c)) 929 if (FRAME_VISIBLE_P (c) || FRAME_ICONIFIED_P (c))
933 return candidate; 930 return candidate;
934 } 931 }
@@ -1052,10 +1049,7 @@ other_visible_frames (FRAME_PTR f)
1052 and note any recent change in visibility. */ 1049 and note any recent change in visibility. */
1053#ifdef HAVE_WINDOW_SYSTEM 1050#ifdef HAVE_WINDOW_SYSTEM
1054 if (FRAME_WINDOW_P (XFRAME (this))) 1051 if (FRAME_WINDOW_P (XFRAME (this)))
1055 { 1052 x_sync (XFRAME (this));
1056 x_sync (XFRAME (this));
1057 FRAME_SAMPLE_VISIBILITY (XFRAME (this));
1058 }
1059#endif 1053#endif
1060 1054
1061 if (FRAME_VISIBLE_P (XFRAME (this)) 1055 if (FRAME_VISIBLE_P (XFRAME (this))
@@ -1231,7 +1225,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
1231 fset_root_window (f, Qnil); 1225 fset_root_window (f, Qnil);
1232 1226
1233 Vframe_list = Fdelq (frame, Vframe_list); 1227 Vframe_list = Fdelq (frame, Vframe_list);
1234 FRAME_SET_VISIBLE (f, 0); 1228 SET_FRAME_VISIBLE (f, 0);
1235 1229
1236 /* Allow the vector of menu bar contents to be freed in the next 1230 /* Allow the vector of menu bar contents to be freed in the next
1237 garbage collection. The frame object itself may not be garbage 1231 garbage collection. The frame object itself may not be garbage
@@ -1579,10 +1573,7 @@ If omitted, FRAME defaults to the currently selected frame. */)
1579 /* I think this should be done with a hook. */ 1573 /* I think this should be done with a hook. */
1580#ifdef HAVE_WINDOW_SYSTEM 1574#ifdef HAVE_WINDOW_SYSTEM
1581 if (FRAME_WINDOW_P (f)) 1575 if (FRAME_WINDOW_P (f))
1582 { 1576 x_make_frame_visible (f);
1583 FRAME_SAMPLE_VISIBILITY (f);
1584 x_make_frame_visible (f);
1585 }
1586#endif 1577#endif
1587 1578
1588 make_frame_visible_1 (f->root_window); 1579 make_frame_visible_1 (f->root_window);
@@ -1705,8 +1696,6 @@ currently being displayed on the terminal. */)
1705{ 1696{
1706 CHECK_LIVE_FRAME (frame); 1697 CHECK_LIVE_FRAME (frame);
1707 1698
1708 FRAME_SAMPLE_VISIBILITY (XFRAME (frame));
1709
1710 if (FRAME_VISIBLE_P (XFRAME (frame))) 1699 if (FRAME_VISIBLE_P (XFRAME (frame)))
1711 return Qt; 1700 return Qt;
1712 if (FRAME_ICONIFIED_P (XFRAME (frame))) 1701 if (FRAME_ICONIFIED_P (XFRAME (frame)))
@@ -2891,7 +2880,6 @@ x_report_frame_params (struct frame *f, Lisp_Object *alistptr)
2891 make_formatted_string (buf, "%"pMu, w)); 2880 make_formatted_string (buf, "%"pMu, w));
2892#endif 2881#endif
2893 store_in_alist (alistptr, Qicon_name, f->icon_name); 2882 store_in_alist (alistptr, Qicon_name, f->icon_name);
2894 FRAME_SAMPLE_VISIBILITY (f);
2895 store_in_alist (alistptr, Qvisibility, 2883 store_in_alist (alistptr, Qvisibility,
2896 (FRAME_VISIBLE_P (f) ? Qt 2884 (FRAME_VISIBLE_P (f) ? Qt
2897 : FRAME_ICONIFIED_P (f) ? Qicon : Qnil)); 2885 : FRAME_ICONIFIED_P (f) ? Qicon : Qnil));