diff options
author | Martin Rudalics <rudalics@gmx.at> | 2015-08-20 08:22:53 +0200 |
---|---|---|
committer | Martin Rudalics <rudalics@gmx.at> | 2015-08-20 08:22:53 +0200 |
commit | 186297de6e0e576af2c52ce96a7fc6af3ba3ffc3 (patch) | |
tree | 693446da7a63cb32ad293cb08e42b7377b4f06a4 | |
parent | 88afeeeafcf018e3eecbcc9be46e227eb312d45a (diff) | |
download | emacs-186297de6e0e576af2c52ce96a7fc6af3ba3ffc3.tar.gz |
In w32fns.c's Fx_frame_geometry rewrite check whether frame has a titlebar
* src/w32fns.c (Fx_frame_geometry): Use title_bar.rgstate[0] to
determine whether frame has a titlebar.
Suggested by Eli Zaretskii <eliz@gnu.org>
-rw-r--r-- | src/w32fns.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index e91097ba20e..a47f3f9a8dc 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -8065,24 +8065,26 @@ and width values are in pixels. external_border_width = window.cxWindowBorders; external_border_height = window.cyWindowBorders; /* Title bar. */ - if ((window.dwStyle & WS_CAPTION) == WS_CAPTION) + if (get_title_bar_info_fn) { - if (get_title_bar_info_fn) - { - TITLEBAR_INFO title_bar; + TITLEBAR_INFO title_bar; - title_bar.cbSize = sizeof (title_bar); - title_bar.rcTitleBar.left = title_bar.rcTitleBar.right = 0; - title_bar.rcTitleBar.top = title_bar.rcTitleBar.bottom = 0; - get_title_bar_info_fn (FRAME_W32_WINDOW (f), &title_bar); - title_bar_width + title_bar.cbSize = sizeof (title_bar); + title_bar.rcTitleBar.left = title_bar.rcTitleBar.right = 0; + title_bar.rcTitleBar.top = title_bar.rcTitleBar.bottom = 0; + for (int i = 0; i < 6; i++) + title_bar.rgstate[i] = 0; + if (get_title_bar_info_fn (FRAME_W32_WINDOW (f), &title_bar) + && !(title_bar.rgstate[0] & 0x00008001)) + { + title_bar_width = title_bar.rcTitleBar.right - title_bar.rcTitleBar.left; title_bar_height = title_bar.rcTitleBar.bottom - title_bar.rcTitleBar.top; } - else - title_bar_height = GetSystemMetrics (SM_CYCAPTION); } + else if ((window.dwStyle & WS_CAPTION) == WS_CAPTION) + title_bar_height = GetSystemMetrics (SM_CYCAPTION); /* Menu bar. */ menu_bar.cbSize = sizeof (menu_bar); menu_bar.rcBar.right = menu_bar.rcBar.left = 0; |