From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Newsgroups: gmane.emacs.bugs Subject: bug#7048: 24.0.50; frame position calculation with vertical tool bar (Gtk+) Date: Fri, 17 Sep 2010 11:07:37 +0200 Message-ID: <4C932FD9.8020009@swipnet.se> References: <87hbhpqx13.fsf@escher.home> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1284714968 5532 80.91.229.12 (17 Sep 2010 09:16:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 17 Sep 2010 09:16:08 +0000 (UTC) Cc: 7048-done@debbugs.gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 17 11:16:06 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OwX35-0001Rd-2Q for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Sep 2010 11:16:03 +0200 Original-Received: from localhost ([127.0.0.1]:55459 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OwX34-0005Sx-DQ for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Sep 2010 05:16:02 -0400 Original-Received: from [140.186.70.92] (port=37305 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OwX2v-0005RE-4M for bug-gnu-emacs@gnu.org; Fri, 17 Sep 2010 05:15:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OwX2t-0006Hg-QT for bug-gnu-emacs@gnu.org; Fri, 17 Sep 2010 05:15:52 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42844) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OwX2t-0006Hc-P3 for bug-gnu-emacs@gnu.org; Fri, 17 Sep 2010 05:15:51 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OwWtO-0007RY-7V for bug-gnu-emacs@gnu.org; Fri, 17 Sep 2010 05:06:02 -0400 Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Sep 2010 09:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 7048 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 7048@debbugs.gnu.org, jan.h.d@swipnet.se Original-Received: via spool by 7048-done@debbugs.gnu.org id=D7048.128471432128597 (code D ref 7048); Fri, 17 Sep 2010 09:06:01 +0000 Original-Received: (at 7048-done) by debbugs.gnu.org; 17 Sep 2010 09:05:21 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OwWsi-0007RC-Ec for submit@debbugs.gnu.org; Fri, 17 Sep 2010 05:05:20 -0400 Original-Received: from smtprelay-b11.telenor.se ([62.127.194.20]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OwWsg-0007R7-8i for 7048-done@debbugs.gnu.org; Fri, 17 Sep 2010 05:05:19 -0400 Original-Received: from ipb2.telenor.se (ipb2.telenor.se [195.54.127.165]) by smtprelay-b11.telenor.se (Postfix) with ESMTP id 17D37E9401 for <7048-done@debbugs.gnu.org>; Fri, 17 Sep 2010 11:07:38 +0200 (CEST) X-SENDER-IP: [85.225.45.35] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkA0AArNkkxV4S0jPGdsb2JhbACHbZolDAEBAQE1LcFUgwMIgjYEjS0 X-IronPort-AV: E=Sophos;i="4.56,381,1280700000"; d="scan'208";a="130675451" Original-Received: from c-232de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.35]) by ipb2.telenor.se with ESMTP; 17 Sep 2010 11:07:38 +0200 Original-Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id 04C277FA05A; Fri, 17 Sep 2010 11:07:38 +0200 (CEST) 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 In-Reply-To: <87hbhpqx13.fsf@escher.home> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 17 Sep 2010 05:06:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:40242 Archived-At: 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'' >