aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1995-05-30 18:47:11 +0000
committerKarl Heuer1995-05-30 18:47:11 +0000
commit7a9947284cf5a93b49f6d610e3060042aed780e8 (patch)
tree4f71b45d669513d360dfa3475dfb8d6ea53d864b
parent4bcdbab1939f7846854bef23f97769bc282d3667 (diff)
downloademacs-7a9947284cf5a93b49f6d610e3060042aed780e8.tar.gz
emacs-7a9947284cf5a93b49f6d610e3060042aed780e8.zip
(x_top_window_to_frame): Don't match menu-bar widget.
(x_window): Use applicationShellWidgetClass, not topLevelShellWidgetClass. Call lw_set_main_areas after creating the menubar widget.
-rw-r--r--src/xfns.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/xfns.c b/src/xfns.c
index d90bd4d468c..fb62b8042a1 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -379,10 +379,14 @@ x_top_window_to_frame (dpyinfo, wdesc)
379 /* This frame matches if the window is its topmost widget. */ 379 /* This frame matches if the window is its topmost widget. */
380 if (wdesc == XtWindow (x->widget)) 380 if (wdesc == XtWindow (x->widget))
381 return f; 381 return f;
382#if 0 /* I don't know why it did this,
383 but it seems logically wrong,
384 and it causes trouble for MapNotify events. */
382 /* Match if the window is this frame's menubar. */ 385 /* Match if the window is this frame's menubar. */
383 if (x->menubar_widget 386 if (x->menubar_widget
384 && wdesc == XtWindow (x->menubar_widget)) 387 && wdesc == XtWindow (x->menubar_widget))
385 return f; 388 return f;
389#endif
386 } 390 }
387 return 0; 391 return 0;
388} 392}
@@ -2387,7 +2391,7 @@ x_window (f, window_prompting, minibuffer_only)
2387 XtSetArg (al[ac], XtNmappedWhenManaged, 0); ac++; 2391 XtSetArg (al[ac], XtNmappedWhenManaged, 0); ac++;
2388 XtSetArg (al[ac], XtNborderWidth, f->display.x->border_width); ac++; 2392 XtSetArg (al[ac], XtNborderWidth, f->display.x->border_width); ac++;
2389 shell_widget = XtAppCreateShell (f->namebuf, EMACS_CLASS, 2393 shell_widget = XtAppCreateShell (f->namebuf, EMACS_CLASS,
2390 topLevelShellWidgetClass, 2394 applicationShellWidgetClass,
2391 FRAME_X_DISPLAY (f), al, ac); 2395 FRAME_X_DISPLAY (f), al, ac);
2392 2396
2393 f->display.x->widget = shell_widget; 2397 f->display.x->widget = shell_widget;
@@ -2414,12 +2418,9 @@ x_window (f, window_prompting, minibuffer_only)
2414 frame_widget = XtCreateWidget (f->namebuf, 2418 frame_widget = XtCreateWidget (f->namebuf,
2415 emacsFrameClass, 2419 emacsFrameClass,
2416 pane_widget, al, ac); 2420 pane_widget, al, ac);
2417 lw_set_main_areas (pane_widget, f->display.x->menubar_widget, frame_widget);
2418 2421
2419 f->display.x->edit_widget = frame_widget; 2422 f->display.x->edit_widget = frame_widget;
2420 2423
2421 if (f->display.x->menubar_widget)
2422 XtManageChild (f->display.x->menubar_widget);
2423 XtManageChild (frame_widget); 2424 XtManageChild (frame_widget);
2424 2425
2425 /* Do some needed geometry management. */ 2426 /* Do some needed geometry management. */
@@ -2535,6 +2536,7 @@ x_window (f, window_prompting, minibuffer_only)
2535 2536
2536 if (!minibuffer_only && FRAME_EXTERNAL_MENU_BAR (f)) 2537 if (!minibuffer_only && FRAME_EXTERNAL_MENU_BAR (f))
2537 initialize_frame_menubar (f); 2538 initialize_frame_menubar (f);
2539 lw_set_main_areas (pane_widget, f->display.x->menubar_widget, frame_widget);
2538 2540
2539 if (FRAME_X_WINDOW (f) == 0) 2541 if (FRAME_X_WINDOW (f) == 0)
2540 error ("Unable to create window"); 2542 error ("Unable to create window");