all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: 7048-done@debbugs.gnu.org
Subject: bug#7048: 24.0.50; frame position calculation with vertical tool bar (Gtk+)
Date: Fri, 17 Sep 2010 11:07:37 +0200	[thread overview]
Message-ID: <4C932FD9.8020009@swipnet.se> (raw)
In-Reply-To: <87hbhpqx13.fsf@escher.home>

Checked in with one change:
#ifdef HAVE_WINDOW_SYSTEM
replaced with
#ifdef FRAME_TOOLBAR_WIDTH

as not all window systems define FRAME_TOOLBAR_WIDTH.

	Jan D.

Stephen Berman skrev 2010-09-16 22.00:
> 1. emacs -Q
> 2. Click menu Options->Show/Hide->Tool-bar->On the left (or: ->On the
>     right, it doesn't matter which).
> 3. Move the frame to the left edge of the monitor display.
> 4. M-x speedbar
> =>  The speedbar frame opens overlapping the right side of the main frame
> by the width of the vertical tool bar.
>
> The reason for the overlap is that only frame-pixel-width is used (in
> dframe-reposition-frame-emacs) to calculate the width, but this does not
> take the tool bar into account.  That's innocuous with the default
> horizontal tool bar, but not when it's placed vertically.  AFAICT there
> is no easy way in Lisp to get this number (you can calculate it using
> the (fullscreen . fullwidth) frame parameter with and without a vertical
> tool bar, but it would be absurd to do that in the middle of a program).
> But it seems straightforward to expose the value of FRAME_TOOLBAR_WIDTH
> to Lisp, following the example of frame-pixel-width.  The attached patch
> does this (I did not bother to implement a wrapper like x_pixel_width in
> Fframe_pixel_width, since I don't see an additional use for it in the
> case of the tool bar width).  This can then be used to make the correct
> frame repositioning in dframe-reposition-frame-emacs, as in the attached
> patch (I also increased the space on the right from 5 to 10 pixels, to
> make it the same as the space on the left; alternatively, both could be
> 5 pixels, which on my system appears to leave no space between the two
> frames).  (This fixes the frame repositioning for the default value
> 'left-right of speedbar-default-position.  I think there may be problems
> with the value 'left or 'right when the parent frame is too close to the
> display edge, but perhaps that can be regarded as a poor choice by the
> user, so I didn't bother with it.)
>
> In GNU Emacs 24.0.50.7 (i686-pc-linux-gnu, GTK+ Version 2.18.6)
>   of 2010-09-16 on escher
> Windowing system distributor `The X.Org Foundation', version 11.0.10605000
> configured using `configure  '--with-imagemagick' '--without-toolkit-scroll-bars''
>





      reply	other threads:[~2010-09-17  9:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-16 20:00 bug#7048: 24.0.50; frame position calculation with vertical tool bar (Gtk+) Stephen Berman
2010-09-17  9:07 ` Jan Djärv [this message]

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

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

  git send-email \
    --in-reply-to=4C932FD9.8020009@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=7048-done@debbugs.gnu.org \
    --cc=stephen.berman@gmx.net \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.