aboutsummaryrefslogtreecommitdiffstats
path: root/src/macfns.c
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2007-06-14 08:38:52 +0000
committerYAMAMOTO Mitsuharu2007-06-14 08:38:52 +0000
commitcccda642c8a40655eb70a07ba69ce4c6d3ddcade (patch)
tree9da31f617c994607a07ce9983c23099c42a2ee6d /src/macfns.c
parent66d8c4894d2faf438d83d88e44cf761b8b28b03a (diff)
downloademacs-cccda642c8a40655eb70a07ba69ce4c6d3ddcade.tar.gz
emacs-cccda642c8a40655eb70a07ba69ce4c6d3ddcade.zip
(mac_window) [USE_MAC_TOOLBAR]: Set toolbar_win_gravity.
(x_set_tool_bar_lines) [USE_MAC_TOOLBAR]: Set FRAME_EXTERNAL_TOOL_BAR.
Diffstat (limited to 'src/macfns.c')
-rw-r--r--src/macfns.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/macfns.c b/src/macfns.c
index b98e2814281..cd571a13c5e 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -1682,6 +1682,25 @@ x_set_tool_bar_lines (f, value, oldval)
1682 /* Make sure we redisplay all windows in this frame. */ 1682 /* Make sure we redisplay all windows in this frame. */
1683 ++windows_or_buffers_changed; 1683 ++windows_or_buffers_changed;
1684 1684
1685#if USE_MAC_TOOLBAR
1686 FRAME_TOOL_BAR_LINES (f) = 0;
1687 if (nlines)
1688 {
1689 FRAME_EXTERNAL_TOOL_BAR (f) = 1;
1690 if (FRAME_MAC_P (f) && !IsWindowToolbarVisible (FRAME_MAC_WINDOW (f)))
1691 /* Make sure next redisplay shows the tool bar. */
1692 XWINDOW (FRAME_SELECTED_WINDOW (f))->update_mode_line = Qt;
1693 }
1694 else
1695 {
1696 if (FRAME_EXTERNAL_TOOL_BAR (f))
1697 free_frame_tool_bar (f);
1698 FRAME_EXTERNAL_TOOL_BAR (f) = 0;
1699 }
1700
1701 return;
1702#endif
1703
1685 delta = nlines - FRAME_TOOL_BAR_LINES (f); 1704 delta = nlines - FRAME_TOOL_BAR_LINES (f);
1686 1705
1687 /* Don't resize the tool-bar to more than we have room for. */ 1706 /* Don't resize the tool-bar to more than we have room for. */
@@ -2284,6 +2303,16 @@ mac_window (f)
2284 XSetWindowBackground (FRAME_MAC_DISPLAY(f), FRAME_MAC_WINDOW (f), 2303 XSetWindowBackground (FRAME_MAC_DISPLAY(f), FRAME_MAC_WINDOW (f),
2285 FRAME_BACKGROUND_PIXEL (f)); 2304 FRAME_BACKGROUND_PIXEL (f));
2286 2305
2306#if USE_MAC_TOOLBAR
2307 /* At the moment, the size of the tool bar is not yet known. We
2308 record the gravity value of the newly created window and use it
2309 to adjust the position of the window (especially for a negative
2310 specification of its vertical position) when the tool bar is
2311 first redisplayed. */
2312 if (FRAME_EXTERNAL_TOOL_BAR (f))
2313 f->output_data.mac->toolbar_win_gravity = f->win_gravity;
2314#endif
2315
2287 validate_x_resource_name (); 2316 validate_x_resource_name ();
2288 2317
2289 /* x_set_name normally ignores requests to set the name if the 2318 /* x_set_name normally ignores requests to set the name if the