Mercurial > emacs
comparison src/w32fns.c @ 109058:2f0720afc474
Change default-frame-alist and menu/tool-bar-mode interaction (Bug#2249).
Don't add entries for `menu-bar-lines' and `tool-bar-lines' to
`default-frame-alist' and `initial-frame-alist' at startup.
Instead, use X resources to update the `menu-bar-mode' and
`tool-bar-mode' variables at startup, and use them as defaults during
frame creation.
* lisp/frame.el (frame-notice-user-settings): Don't change
default-frame-alist based on menu-bar-mode and tool-bar-mode, or
vice versa.
* lisp/menu-bar.el (menu-bar-mode):
* lisp/tool-bar.el (tool-bar-mode): Don't change default-frame-alist.
Set init-value to t.
* lisp/startup.el (command-line): Use X resources to set the value of
menu-bar-mode and tool-bar-mode, before calling frame-initialize.
* src/frame.c (Vmenu_bar_mode, Vtool_bar_mode): New vars.
* src/w32fns.c (Fx_create_frame):
* src/nsfns.m (Fx_create_frame): Likewise.
* src/xfns.c (Fx_create_frame): Don't consult X resouces when setting
menu-bar-lines and tool-bar-lines. Use menu-bar-mode and
tool-bar-mode, which are now set using these X resources at
startup, to determine the defaults.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sat, 26 Jun 2010 20:30:52 -0400 |
parents | 36d25edeedb5 |
children | 2bc9a0c04c87 |
comparison
equal
deleted
inserted
replaced
109057:384a6f7da770 | 109058:2f0720afc474 |
---|---|
288 #define MENU_FREE_DELAY 1000 | 288 #define MENU_FREE_DELAY 1000 |
289 static unsigned menu_free_timer = 0; | 289 static unsigned menu_free_timer = 0; |
290 | 290 |
291 /* The below are defined in frame.c. */ | 291 /* The below are defined in frame.c. */ |
292 | 292 |
293 extern Lisp_Object Vmenu_bar_mode, Vtool_bar_mode; | |
293 extern Lisp_Object Vwindow_system_version; | 294 extern Lisp_Object Vwindow_system_version; |
294 | 295 |
295 #ifdef GLYPH_DEBUG | 296 #ifdef GLYPH_DEBUG |
296 int image_cache_refcount, dpyinfo_refcount; | 297 int image_cache_refcount, dpyinfo_refcount; |
297 #endif | 298 #endif |
4460 which runs hooks, which call Fvertical_motion. At the end, we | 4461 which runs hooks, which call Fvertical_motion. At the end, we |
4461 end up in init_iterator with a null face cache, which should not | 4462 end up in init_iterator with a null face cache, which should not |
4462 happen. */ | 4463 happen. */ |
4463 init_frame_faces (f); | 4464 init_frame_faces (f); |
4464 | 4465 |
4465 x_default_parameter (f, parameters, Qmenu_bar_lines, make_number (1), | 4466 /* The X resources controlling the menu-bar and tool-bar are |
4466 "menuBar", "MenuBar", RES_TYPE_NUMBER); | 4467 processed specially at startup, and reflected in the mode |
4467 x_default_parameter (f, parameters, Qtool_bar_lines, make_number (1), | 4468 variables; ignore them here. */ |
4468 "toolBar", "ToolBar", RES_TYPE_NUMBER); | 4469 x_default_parameter (f, parameters, Qmenu_bar_lines, |
4470 NILP (Vmenu_bar_mode) | |
4471 ? make_number (0) : make_number (1), | |
4472 NULL, NULL, RES_TYPE_NUMBER); | |
4473 x_default_parameter (f, parameters, Qtool_bar_lines, | |
4474 NILP (Vtool_bar_mode) | |
4475 ? make_number (0) : make_number (1), | |
4476 NULL, NULL, RES_TYPE_NUMBER); | |
4469 | 4477 |
4470 x_default_parameter (f, parameters, Qbuffer_predicate, Qnil, | 4478 x_default_parameter (f, parameters, Qbuffer_predicate, Qnil, |
4471 "bufferPredicate", "BufferPredicate", RES_TYPE_SYMBOL); | 4479 "bufferPredicate", "BufferPredicate", RES_TYPE_SYMBOL); |
4472 x_default_parameter (f, parameters, Qtitle, Qnil, | 4480 x_default_parameter (f, parameters, Qtitle, Qnil, |
4473 "title", "Title", RES_TYPE_STRING); | 4481 "title", "Title", RES_TYPE_STRING); |