aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2012-11-23 19:39:48 +0400
committerDmitry Antipov2012-11-23 19:39:48 +0400
commitf418b22ee985bb6887c45856a1cabe2f5c726fca (patch)
tree51417635f4321a34ffb460c8266866ec87f5a94c /src
parente7d0e5ee247a155a268ffbf80bedbe25e15b5032 (diff)
downloademacs-f418b22ee985bb6887c45856a1cabe2f5c726fca.tar.gz
emacs-f418b22ee985bb6887c45856a1cabe2f5c726fca.zip
* 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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog16
-rw-r--r--src/frame.h3
-rw-r--r--src/nsterm.h3
-rw-r--r--src/w32menu.c13
-rw-r--r--src/w32term.h16
-rw-r--r--src/xterm.h14
6 files changed, 24 insertions, 41 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 45df517eff5..e5669da5196 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,19 @@
12012-11-23 Dmitry Antipov <dmantipov@yandex.ru>
2
3 * frame.h (struct frame): Remove display_preempted member
4 since all users are dead long ago.
5 * nsterm.h (struct x_output): Use the only dummy member.
6 * w32menu.c (pending_menu_activation): Remove since not
7 really used.
8 (set_frame_menubar): Adjust user.
9 * w32term.h (struct x_output): Drop outdated #if 0 code.
10 (struct w32_output): Use bitfields for explicit_parent,
11 asked_for_visible and menubar_active members. Drop
12 unused pending_menu_activation member.
13 * xterm.h (struct x_output): Drop outdated #if 0 code.
14 Use bitfields for explicit_parent, asked_for_visible,
15 has_been_visible and net_wm_state_hidden_seen members.
16
12012-11-23 Eli Zaretskii <eliz@gnu.org> 172012-11-23 Eli Zaretskii <eliz@gnu.org>
2 18
3 * makefile.w32-in (globals.h, gl-stamp): Use $(SWITCHCHAR) instead 19 * makefile.w32-in (globals.h, gl-stamp): Use $(SWITCHCHAR) instead
diff --git a/src/frame.h b/src/frame.h
index 87c4fcb0555..5ebfc2f7ec3 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -357,9 +357,6 @@ struct frame
357 unsigned int external_menu_bar : 1; 357 unsigned int external_menu_bar : 1;
358#endif 358#endif
359 359
360 /* Nonzero if last attempt at redisplay on this frame was preempted. */
361 unsigned display_preempted : 1;
362
363 /* visible is nonzero if the frame is currently displayed; we check 360 /* visible is nonzero if the frame is currently displayed; we check
364 it to see if we should bother updating the frame's contents. 361 it to see if we should bother updating the frame's contents.
365 DON'T SET IT DIRECTLY; instead, use FRAME_SET_VISIBLE. 362 DON'T SET IT DIRECTLY; instead, use FRAME_SET_VISIBLE.
diff --git a/src/nsterm.h b/src/nsterm.h
index 2e868b86caf..005701ed415 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -630,8 +630,7 @@ struct ns_output
630/* this dummy decl needed to support TTYs */ 630/* this dummy decl needed to support TTYs */
631struct x_output 631struct x_output
632{ 632{
633 unsigned long background_pixel; 633 int unused;
634 unsigned long foreground_pixel;
635}; 634};
636 635
637 636
diff --git a/src/w32menu.c b/src/w32menu.c
index 36bf9574fdc..84fb1bdc71e 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -114,17 +114,6 @@ static int fill_in_menu (HMENU, widget_value *);
114 114
115void w32_free_menu_strings (HWND); 115void w32_free_menu_strings (HWND);
116 116
117
118
119/* This is set nonzero after the user activates the menu bar, and set
120 to zero again after the menu bars are redisplayed by prepare_menu_bar.
121 While it is nonzero, all calls to set_frame_menubar go deep.
122
123 I don't understand why this is needed, but it does seem to be
124 needed on Motif, according to Marcus Daniels <marcus@sysc.pdx.edu>. */
125
126int pending_menu_activation;
127
128#ifdef HAVE_MENUS 117#ifdef HAVE_MENUS
129 118
130DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0, 119DEFUN ("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)
389 378
390 if (! menubar_widget) 379 if (! menubar_widget)
391 deep_p = 1; 380 deep_p = 1;
392 else if (pending_menu_activation && !deep_p)
393 deep_p = 1;
394 381
395 if (deep_p) 382 if (deep_p)
396 { 383 {
diff --git a/src/w32term.h b/src/w32term.h
index ce709c1231d..28d4ca6c490 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -251,16 +251,10 @@ extern Lisp_Object x_get_focus_frame (struct frame *);
251 diffs between X and w32 code. */ 251 diffs between X and w32 code. */
252struct x_output 252struct x_output
253{ 253{
254#if 0 /* These are also defined in struct frame. Use that instead. */
255 PIX_TYPE background_pixel;
256 PIX_TYPE foreground_pixel;
257#endif
258
259 /* Keep track of focus. May be EXPLICIT if we received a FocusIn for this 254 /* Keep track of focus. May be EXPLICIT if we received a FocusIn for this
260 frame, or IMPLICIT if we received an EnterNotify. 255 frame, or IMPLICIT if we received an EnterNotify.
261 FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ 256 FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */
262 int focus_state; 257 int focus_state;
263
264}; 258};
265 259
266enum 260enum
@@ -347,17 +341,13 @@ struct w32_output
347 341
348 /* Nonzero means our parent is another application's window 342 /* Nonzero means our parent is another application's window
349 and was explicitly specified. */ 343 and was explicitly specified. */
350 char explicit_parent; 344 unsigned explicit_parent : 1;
351 345
352 /* Nonzero means tried already to make this frame visible. */ 346 /* Nonzero means tried already to make this frame visible. */
353 char asked_for_visible; 347 unsigned asked_for_visible : 1;
354 348
355 /* Nonzero means menubar is currently active. */ 349 /* Nonzero means menubar is currently active. */
356 char menubar_active; 350 unsigned menubar_active : 1;
357
358 /* Nonzero means menubar is about to become active, but should be
359 brought up to date first. */
360 volatile char pending_menu_activation;
361 351
362 /* Relief GCs, colors etc. */ 352 /* Relief GCs, colors etc. */
363 struct relief 353 struct relief
diff --git a/src/xterm.h b/src/xterm.h
index 6ef3d11fe48..d63ed1c4583 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -506,12 +506,6 @@ struct x_output
506 value contains an ID of the fontset, else -1. */ 506 value contains an ID of the fontset, else -1. */
507 int fontset; 507 int fontset;
508 508
509 /* Pixel values used for various purposes.
510 border_pixel may be -1 meaning use a gray tile. */
511#if 0 /* These are also defined in struct frame. Use that instead. */
512 unsigned long background_pixel;
513 unsigned long foreground_pixel;
514#endif
515 unsigned long cursor_pixel; 509 unsigned long cursor_pixel;
516 unsigned long border_pixel; 510 unsigned long border_pixel;
517 unsigned long mouse_pixel; 511 unsigned long mouse_pixel;
@@ -574,13 +568,13 @@ struct x_output
574 568
575 /* Nonzero means our parent is another application's window 569 /* Nonzero means our parent is another application's window
576 and was explicitly specified. */ 570 and was explicitly specified. */
577 char explicit_parent; 571 unsigned explicit_parent : 1;
578 572
579 /* Nonzero means tried already to make this frame visible. */ 573 /* Nonzero means tried already to make this frame visible. */
580 char asked_for_visible; 574 unsigned asked_for_visible : 1;
581 575
582 /* Nonzero if this frame was ever previously visible. */ 576 /* Nonzero if this frame was ever previously visible. */
583 char has_been_visible; 577 unsigned has_been_visible : 1;
584 578
585#ifdef HAVE_X_I18N 579#ifdef HAVE_X_I18N
586 /* Input context (currently, this means Compose key handler setup). */ 580 /* Input context (currently, this means Compose key handler setup). */
@@ -634,7 +628,7 @@ struct x_output
634 int top_before_move; 628 int top_before_move;
635 629
636 /* Non-zero if _NET_WM_STATE_HIDDEN is set for this frame. */ 630 /* Non-zero if _NET_WM_STATE_HIDDEN is set for this frame. */
637 int net_wm_state_hidden_seen; 631 unsigned net_wm_state_hidden_seen : 1;
638}; 632};
639 633
640#define No_Cursor (None) 634#define No_Cursor (None)