From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.bugs Subject: bug#7296: display-pixel-height not enough Date: Mon, 1 Nov 2010 13:00:52 +0100 Message-ID: References: <83hbg66vt4.fsf@gnu.org> <83d3qt77lj.fsf@gnu.org> <4CCA9E5D.5060002@swipnet.se> <838w1h6zbp.fsf@gnu.org> <4CCAC90B.4070800@swipnet.se> <4CCB2713.5070104@swipnet.se> <4CCBC930.5060705@swipnet.se> <4CCBF75B.8070209@swipnet.se> <4CCC558E.5030704@swipnet.se> <7C6D3056-3E04-46E5-A731-A2E996197F03@swipnet.se> <4CCD4A1C.6070707@swipnet.se> <4CCEA66C.8060900@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1288614528 28200 80.91.229.12 (1 Nov 2010 12:28:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 1 Nov 2010 12:28:48 +0000 (UTC) Cc: "7296@debbugs.gnu.org" <7296@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 Mon Nov 01 13:28:40 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 1PCtVA-00080x-CO for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Nov 2010 13:28:40 +0100 Original-Received: from localhost ([127.0.0.1]:34601 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PCtNe-00065i-P5 for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Nov 2010 08:20:54 -0400 Original-Received: from [140.186.70.92] (port=41766 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PCtGT-0002WJ-Bq for bug-gnu-emacs@gnu.org; Mon, 01 Nov 2010 08:13:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PCtGI-0001FT-NZ for bug-gnu-emacs@gnu.org; Mon, 01 Nov 2010 08:13:19 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PCtGI-0001FP-K0 for bug-gnu-emacs@gnu.org; Mon, 01 Nov 2010 08:13:18 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PCt1W-0003Sb-6k; Mon, 01 Nov 2010 07:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lennart Borgman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Nov 2010 11:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7296 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7296-submit@debbugs.gnu.org id=B7296.128861262413293 (code B ref 7296); Mon, 01 Nov 2010 11:58:02 +0000 Original-Received: (at 7296) by debbugs.gnu.org; 1 Nov 2010 11:57:04 +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 1PCt0a-0003SM-6i for submit@debbugs.gnu.org; Mon, 01 Nov 2010 07:57:04 -0400 Original-Received: from mail-gy0-f172.google.com ([209.85.160.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PCt0Y-0003S0-MD for 7296@debbugs.gnu.org; Mon, 01 Nov 2010 07:57:03 -0400 Original-Received: by gya6 with SMTP id 6so3122192gya.3 for <7296@debbugs.gnu.org>; Mon, 01 Nov 2010 05:01:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=Kuf0KvAUmM5a5IFQCCGT/mVcHkxltSXX3kHgn46eO5g=; b=OeAQcJaByzCBFK5Obfgu9fj8a3v9tPN3rLinJmqb3YvJYrMcTze2hWgq9AuHu6sk13 KhcEUoQUEtUISyJ33ZGBHgFw1dc2/CvzYZ7zk87F1ECQmEYsqUcvA8xZ9f5SL6G9LMvj 34WwIZqxnmZMSR0syZKGrXSgFX9vBVITEZEoE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=dkIye/PUpaRVKJxUJcgjP3Zoli1TaUm5Xoy3npoZsfILj2e7xQeCBe6y5yY/BpA+Py 02fSq8FDpHGo7ahG6mwDvInOtUIOxNbs7C876w0LrPbEnOKpU8pt4zY+XJsFyJmKH8lE t2hBS3YTr9epB+jTPYjDxXjUxqq42J4/wU7oA= Original-Received: by 10.229.231.4 with SMTP id jo4mr3506160qcb.22.1288612881870; Mon, 01 Nov 2010 05:01:21 -0700 (PDT) Original-Received: by 10.229.224.199 with HTTP; Mon, 1 Nov 2010 05:00:52 -0700 (PDT) In-Reply-To: <4CCEA66C.8060900@swipnet.se> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 01 Nov 2010 07:58: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:41337 Archived-At: On Mon, Nov 1, 2010 at 12:37 PM, Jan Dj=C3=A4rv wrote: > 2010-10-31 13:46, Lennart Borgman skrev: >> >> On Sun, Oct 31, 2010 at 11:51 AM, Jan Dj=C3=A4rv =C2= =A0wrote: >> >>>>> I know that W32 has some mechanism to maximize a window without >>>>> fiddling >>>>> with height and width. You should check if there is a similar way to >>>>> maximize just height by asking the system to do it. >>>> >>>> I told how to do this earlier in this thread. Or did not that message >>>> reach >>>> you? >>> >>> Actually you did not. =C2=A0You showed how to get display pixel sizes. = =C2=A0More >>> is >>> needed to correctly calculate the Emacs frame dimensions. >> >> Some misunderstanding. I told the API:s for getting the size of the work >> area. > > Whis is not the same thing at all. =C2=A0Making an Emacs frame maximized = in > height from lisp code is so much more, as others have told you. =C2=A0And= you > need a sure way to do this for all platforms and for all window managers = if > it is to be any good at all. Maybe you are misunderstanding part what I am saying. However I might have misunderstood something here too. Some clarifications: - I am speaking mainly about the w32 platform because I know how the window manager behaves there. I know nothing about the window manages on other platforms. So please just add suggestions for other platforms too. - On w32 display-pixel-height currently returns the total display size instead of the work area (i.e. the area that the window managers thinks fit for normally handled windows). I can't see that we have any use of the total display size on w32. (Though Jason said there might be. I asked him to clarify this.) - On w32 you do not maximize a window by setting the size. (I do not know how this is handled currently in the unpatched Emacs but I changed it several years ago in my patched Emacs.) - My initial proposal was to add new functions for the work area size. However Eli suggested changing display-pixel-height instead on w32 (if I did not misunderstood Eli). I don't care much which way we do it, but I think we should have functions to get the size of the work area. > Nothing is unclear. =C2=A0It is just that you want to change one value fo= r > another with unforseen consequences for various platforms instead of solv= ing > the problem, making a window maximized on height. I am trying to avoid bad consequences, of course (without beeing bug back compatible). You may want the max width or height without immediately setting them. > If we change display-height, it will cause problems on other platforms, X= 11 > comes to mind, where autohide and panel always on top is something the > window manager keeps track of. =C2=A0If we only do this for W32 display h= eight > means two different things. =C2=A0Also as has been pointed out, stuff lik= e > calculating DPI will be wrong. Ok. On w32 the window manager also keeps track of those things (with the API:s I pointed to, but not with the current implementation of display-pixel-height/width). So then it looks best to me to add new functions for the work area size. What do you think of that?