GNU bug report logs -
#7048
24.0.50; frame position calculation with vertical tool bar (Gtk+)
Previous Next
Reported by: Stephen Berman <stephen.berman <at> gmx.net>
Date: Thu, 16 Sep 2010 19:58:02 UTC
Severity: normal
Found in version 24.0.50
Done: Jan Djärv <jan.h.d <at> swipnet.se>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7048 in the body.
You can then email your comments to 7048 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7048
; Package
emacs
.
(Thu, 16 Sep 2010 19:58:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stephen Berman <stephen.berman <at> gmx.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 16 Sep 2010 19:58:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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''
[bzr-diff (text/x-patch, attachment)]
Reply sent
to
Jan Djärv <jan.h.d <at> swipnet.se>
:
You have taken responsibility.
(Fri, 17 Sep 2010 09:06:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Stephen Berman <stephen.berman <at> gmx.net>
:
bug acknowledged by developer.
(Fri, 17 Sep 2010 09:06:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 7048-done <at> debbugs.gnu.org (full text, mbox):
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''
>
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 15 Oct 2010 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 249 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.