unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 24107@debbugs.gnu.org
Subject: bug#24107: 25.1; menu-bar-size and tool-bar-size are reported inconsistently on w32
Date: Sat, 30 Jul 2016 11:39:22 +0200	[thread overview]
Message-ID: <579C75CA.2050403@gmx.at> (raw)
In-Reply-To: <83shurplfn.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 442 bytes --]

 > OK, but this means you can compute the width of the tool bar as you do
 > for any other window, and then add to that the width of the fringes.
 > Since on Windows the tool bar is just a special window which doesn't
 > have fringes, this should be accurate, no?

It's not related to fringes.  I forgot to subtract the width of the
external borders.  Does the attached patch (mostly fixing indentation
hell) give the correct result?

martin

[-- Attachment #2: w32fns.diff --]
[-- Type: text/plain, Size: 1492 bytes --]

diff --git a/src/w32fns.c b/src/w32fns.c
index 584e311..2b07bb2 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -8465,24 +8465,25 @@ with offset DY added (default is -10).
 		Fcons (Qouter_size,
 		       Fcons (make_number (right - left),
 			      make_number (bottom - top))),
-	   Fcons (Qexternal_border_size,
+		Fcons (Qexternal_border_size,
 		       Fcons (make_number (external_border_width),
 			      make_number (external_border_height))),
 		Fcons (Qtitle_bar_size,
 		       Fcons (make_number (title_bar_width),
 			      make_number (title_bar_height))),
-	   Fcons (Qmenu_bar_external, Qt),
-	   Fcons (Qmenu_bar_size,
-		  Fcons (make_number
-			 (menu_bar.rcBar.right - menu_bar.rcBar.left),
-			 make_number (menu_bar_height))),
-	   Fcons (Qtool_bar_external, Qnil),
+		Fcons (Qmenu_bar_external, Qt),
+		Fcons (Qmenu_bar_size,
+		       Fcons (make_number
+			      (menu_bar.rcBar.right - menu_bar.rcBar.left),
+			      make_number (menu_bar_height))),
+		Fcons (Qtool_bar_external, Qnil),
 		Fcons (Qtool_bar_position, tool_bar_height ? Qtop : Qnil),
-	   Fcons (Qtool_bar_size,
+		Fcons (Qtool_bar_size,
 		       Fcons (make_number
 			      (tool_bar_height
-			       ? right - left - 2 * internal_border_width
-				      : 0),
+			       ? (right - left - 2 * external_border_width
+				  - 2 * internal_border_width)
+			       : 0),
 			      make_number (tool_bar_height))),
 		Fcons (Qinternal_border_width,
 		       make_number (internal_border_width)));


  reply	other threads:[~2016-07-30  9:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-29 17:59 bug#24107: 25.1; menu-bar-size and tool-bar-size are reported inconsistently on w32 Eli Zaretskii
2016-07-30  8:22 ` martin rudalics
2016-07-30  8:41   ` Eli Zaretskii
2016-07-30  9:39     ` martin rudalics [this message]
2016-07-30 10:36       ` Eli Zaretskii
2016-07-30 12:30         ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=579C75CA.2050403@gmx.at \
    --to=rudalics@gmx.at \
    --cc=24107@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).