emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-bug-tracker] bug#7048: closed (24.0.50; frame position calculatio


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#7048: closed (24.0.50; frame position calculation with vertical tool bar (Gtk+))
Date: Fri, 17 Sep 2010 09:06:02 +0000

Your message dated Fri, 17 Sep 2010 11:07:37 +0200
with message-id <address@hidden>
and subject line Re: bug#7048: 24.0.50; frame position calculation with 
vertical tool bar (Gtk+)
has caused the GNU bug report #7048,
regarding 24.0.50; frame position calculation with vertical tool bar (Gtk+)
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
7048: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7048
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.0.50; frame position calculation with vertical tool bar (Gtk+) Date: Thu, 16 Sep 2010 22:00:08 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
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''

Attachment: bzr-diff
Description: tool bar width patch


--- End Message ---
--- Begin Message --- Subject: Re: bug#7048: 24.0.50; frame position calculation with vertical tool bar (Gtk+) Date: Fri, 17 Sep 2010 11:07:37 +0200 User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3
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''



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]