From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#14233: 24.3; Don't constrain frame size to character multiples Date: Thu, 25 Apr 2013 09:29:05 +0200 Message-ID: <5178DB41.2060708@gmx.at> References: <2r7gjy2gyy.fsf@fencepost.gnu.org> <83bo991z00.fsf@gnu.org> <517257A0.4080607@gmx.at> <071A708E-3A98-4D11-A15F-7AB92D5200DD@swipnet.se> <51727563.70905@gmx.at> <5172908F.7090206@swipnet.se> <83sj2lz6nm.fsf@gnu.org> <5172EBEF.7030301@swipnet.se> <5173B0D8.4010408@gmx.at> <9CE9273D-8550-478F-8CB9-0C0D693C0BB8@swipnet.se> <5175042E.5020508@gmx.at> <5064BF03-8A61-4C0E-AA6C-5197A177B61A@swipnet.se> <517558ED.7080907@gmx.at> <5175679B.8010903@gmx.at> <868917EF-7586-4F0D-BCDA-0B6F83FBB0A6@swipnet.se> <51767F8E.7000106@gmx.at> <83zjwpw5uh.fsf@gnu.org> <51777E2B.6090508@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1366875013 30141 80.91.229.3 (25 Apr 2013 07:30:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Apr 2013 07:30:13 +0000 (UTC) Cc: esabof@gmail.com, 14233@debbugs.gnu.org To: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 25 09:30:15 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UVGd7-0004pM-ST for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Apr 2013 09:30:10 +0200 Original-Received: from localhost ([::1]:45925 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVGd6-0006GB-Uj for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Apr 2013 03:30:08 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVGcz-0006C1-5k for bug-gnu-emacs@gnu.org; Thu, 25 Apr 2013 03:30:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVGcu-0006r1-GG for bug-gnu-emacs@gnu.org; Thu, 25 Apr 2013 03:30:01 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVGcu-0006qu-Cs for bug-gnu-emacs@gnu.org; Thu, 25 Apr 2013 03:29:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UVGhq-0001v5-4e for bug-gnu-emacs@gnu.org; Thu, 25 Apr 2013 03:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Apr 2013 07:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14233 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14233-submit@debbugs.gnu.org id=B14233.13668752687160 (code B ref 14233); Thu, 25 Apr 2013 07:35:02 +0000 Original-Received: (at 14233) by debbugs.gnu.org; 25 Apr 2013 07:34:28 +0000 Original-Received: from localhost ([127.0.0.1]:42227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UVGhD-0001r0-KT for submit@debbugs.gnu.org; Thu, 25 Apr 2013 03:34:28 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:56616) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UVGh5-0001qC-Qk for 14233@debbugs.gnu.org; Thu, 25 Apr 2013 03:34:21 -0400 Original-Received: from mailout-de.gmx.net ([10.1.76.16]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0M0euW-1Um6Tl3xvi-00upw6 for <14233@debbugs.gnu.org>; Thu, 25 Apr 2013 09:29:07 +0200 Original-Received: (qmail invoked by alias); 25 Apr 2013 07:29:07 -0000 Original-Received: from 62-47-46-229.adsl.highway.telekom.at (EHLO [62.47.46.229]) [62.47.46.229] by mail.gmx.net (mp016) with SMTP; 25 Apr 2013 09:29:07 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18z6lJBPmIzkkU0d6xQ6FvA+rGFIRLNMRahwG+C/2 5L/7TSoYNVk4m1 In-Reply-To: X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:73667 Archived-At: >> A function that would tell me in a platform independent way the pixel >> offset of the frame's root window from the top edge of the frame's >> "client rectangle" (sorry for the Windows parlance). > > Using MS Windows narrows your world view. If you used Emacs for Gtk+ > you would know that the toolbar can be on any edge (top, bottom, left > or right). So getting just top edge offset is not enough. You need > all four offsets. If you had a broader world view, you would have noticed that the Gtk+ toolbar is not part of the client rectangle (the rectangle passed to change_frame_size), so your point is moot in this context. What I wanted are the much simpler macros #define FRAME_MENU_BAR_HEIGHT(f) (f)->menu_bar_height #define FRAME_TOOL_BAR_HEIGHT(f) (f)->tool_bar_height #define FRAME_TOP_MARGIN_HEIGHT(F) \ (FRAME_MENU_BAR_HEIGHT (F) + FRAME_TOOL_BAR_HEIGHT (F)) where tool_bar_height would count (in pixels) things like `tool-bar-button-margin', `tool-bar-button-relief' and `tool-bar-border', wherever applicable, together with the actual toolbar and menubar heights (in particular, when these have been wrapped). If you want for tiled/user specified/maximized/fullscreen mode on Gtk+ change_frame_size to subtract the Gtk+ toolbar size from that of the screen, then we'd have to first include this size in that of the rectangle passed to change_frame_size. This would, however, constitute a considerable change in the design of the frame/window interface and would be better done in a separate project. martin