* frame.h (struct frame): Remove display_preempted member
authorDmitry Antipov <dmantipov@yandex.ru>
Fri, 23 Nov 2012 15:39:48 +0000 (19:39 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Fri, 23 Nov 2012 15:39:48 +0000 (19:39 +0400)
since all users are dead long ago.
* nsterm.h (struct x_output): Use the only dummy member.
* w32menu.c (pending_menu_activation): Remove since not
really used.
(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.
* 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.

src/ChangeLog
src/frame.h
src/nsterm.h
src/w32menu.c
src/w32term.h
src/xterm.h

index 45df517..e5669da 100644 (file)
@@ -1,3 +1,19 @@
+2012-11-23  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * frame.h (struct frame): Remove display_preempted member
+       since all users are dead long ago.
+       * nsterm.h (struct x_output): Use the only dummy member.
+       * w32menu.c (pending_menu_activation): Remove since not
+       really used.
+       (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.
+       * 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.
+
 2012-11-23  Eli Zaretskii  <eliz@gnu.org>
 
        * makefile.w32-in (globals.h, gl-stamp): Use $(SWITCHCHAR) instead
index 87c4fcb..5ebfc2f 100644 (file)
@@ -357,9 +357,6 @@ struct frame
   unsigned int external_menu_bar : 1;
 #endif
 
-  /* Nonzero if last attempt at redisplay on this frame was preempted.  */
-  unsigned display_preempted : 1;
-
   /* visible is nonzero if the frame is currently displayed; we check
      it to see if we should bother updating the frame's contents.
      DON'T SET IT DIRECTLY; instead, use FRAME_SET_VISIBLE.
index 2e868b8..005701e 100644 (file)
@@ -630,8 +630,7 @@ struct ns_output
 /* this dummy decl needed to support TTYs */
 struct x_output
 {
-  unsigned long background_pixel;
-  unsigned long foreground_pixel;
+  int unused;
 };
 
 
index 36bf957..84fb1bd 100644 (file)
@@ -114,17 +114,6 @@ static int fill_in_menu (HMENU, widget_value *);
 
 void w32_free_menu_strings (HWND);
 
-\f
-
-/* This is set nonzero after the user activates the menu bar, and set
-   to zero again after the menu bars are redisplayed by prepare_menu_bar.
-   While it is nonzero, all calls to set_frame_menubar go deep.
-
-   I don't understand why this is needed, but it does seem to be
-   needed on Motif, according to Marcus Daniels <marcus@sysc.pdx.edu>.  */
-
-int pending_menu_activation;
-\f
 #ifdef HAVE_MENUS
 
 DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0,
@@ -389,8 +378,6 @@ set_frame_menubar (FRAME_PTR f, bool first_time, bool deep_p)
 
   if (! menubar_widget)
     deep_p = 1;
-  else if (pending_menu_activation && !deep_p)
-    deep_p = 1;
 
   if (deep_p)
     {
index ce709c1..28d4ca6 100644 (file)
@@ -251,16 +251,10 @@ extern Lisp_Object x_get_focus_frame (struct frame *);
    diffs between X and w32 code.  */
 struct x_output
 {
-#if 0 /* These are also defined in struct frame.  Use that instead.  */
-  PIX_TYPE background_pixel;
-  PIX_TYPE foreground_pixel;
-#endif
-
   /* Keep track of focus.  May be EXPLICIT if we received a FocusIn for this
      frame, or IMPLICIT if we received an EnterNotify.
      FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */
   int focus_state;
-
 };
 
 enum
@@ -347,17 +341,13 @@ struct w32_output
 
   /* Nonzero means our parent is another application's window
      and was explicitly specified.  */
-  char explicit_parent;
+  unsigned explicit_parent : 1;
 
   /* Nonzero means tried already to make this frame visible.  */
-  char asked_for_visible;
+  unsigned asked_for_visible : 1;
 
   /* Nonzero means menubar is currently active.  */
-  char menubar_active;
-
-  /* Nonzero means menubar is about to become active, but should be
-     brought up to date first.  */
-  volatile char pending_menu_activation;
+  unsigned menubar_active : 1;
 
   /* Relief GCs, colors etc.  */
   struct relief
index 6ef3d11..d63ed1c 100644 (file)
@@ -506,12 +506,6 @@ struct x_output
      value contains an ID of the fontset, else -1.  */
   int fontset;
 
-  /* Pixel values used for various purposes.
-     border_pixel may be -1 meaning use a gray tile.  */
-#if 0 /* These are also defined in struct frame.  Use that instead.  */
-  unsigned long background_pixel;
-  unsigned long foreground_pixel;
-#endif
   unsigned long cursor_pixel;
   unsigned long border_pixel;
   unsigned long mouse_pixel;
@@ -574,13 +568,13 @@ struct x_output
 
   /* Nonzero means our parent is another application's window
      and was explicitly specified.  */
-  char explicit_parent;
+  unsigned explicit_parent : 1;
 
   /* Nonzero means tried already to make this frame visible.  */
-  char asked_for_visible;
+  unsigned asked_for_visible : 1;
 
   /* Nonzero if this frame was ever previously visible.  */
-  char has_been_visible;
+  unsigned has_been_visible : 1;
 
 #ifdef HAVE_X_I18N
   /* Input context (currently, this means Compose key handler setup).  */
@@ -634,7 +628,7 @@ struct x_output
   int top_before_move;
 
   /* Non-zero if _NET_WM_STATE_HIDDEN is set for this frame.  */
-  int net_wm_state_hidden_seen;
+  unsigned net_wm_state_hidden_seen : 1;
 };
 
 #define No_Cursor (None)