From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#25330: emacs -q always produces an emacs that was partially off screen. Date: Thu, 05 Jan 2017 11:05:55 +0100 Message-ID: <586E1A83.6050406@gmx.at> References: <87o9zqggcu.fsf@jidanni.org> <87lgutqcay.fsf@jidanni.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1483610833 5642 195.159.176.226 (5 Jan 2017 10:07:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 5 Jan 2017 10:07:13 +0000 (UTC) Cc: 25330@debbugs.gnu.org To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 05 11:07:09 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cP4wu-0000sJ-Pj for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Jan 2017 11:07:08 +0100 Original-Received: from localhost ([::1]:45164 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cP4wy-0006Zn-Tp for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Jan 2017 05:07:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cP4wt-0006Zi-JH for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2017 05:07:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cP4wo-0001fH-4n for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2017 05:07:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54588) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cP4wo-0001fA-21 for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2017 05:07:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cP4wn-00055D-J6 for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2017 05:07:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Jan 2017 10:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25330 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 25330-submit@debbugs.gnu.org id=B25330.148361078219474 (code B ref 25330); Thu, 05 Jan 2017 10:07:01 +0000 Original-Received: (at 25330) by debbugs.gnu.org; 5 Jan 2017 10:06:22 +0000 Original-Received: from localhost ([127.0.0.1]:41754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cP4w9-000542-MC for submit@debbugs.gnu.org; Thu, 05 Jan 2017 05:06:21 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:57682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cP4w7-00053m-He for 25330@debbugs.gnu.org; Thu, 05 Jan 2017 05:06:20 -0500 Original-Received: from [192.168.1.101] ([212.95.7.106]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MKu9E-1cP4vu3flI-0001Gx; Thu, 05 Jan 2017 11:06:06 +0100 In-Reply-To: <87lgutqcay.fsf@jidanni.org> X-Provags-ID: V03:K0:+IJHQ314h3iuJIl5A91dl8d8alKXjgVFZWvtM1KyPMaBKx2yond P7Q6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Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:127779 Archived-At: > (I had to go back and do C-u 0 C-x C-e to get rid of truncation.) I evaluate idioms like (insert (format "\n%s" (pp (frame-parameters)))) in *scratch* instead. > In the bad initial off window state: > > icewm's size command (ALT+F8) shows > 79x35+606+41 I don't know what the first two values stand for. The 3rd and 4th values are later reported by =E2=80=98frame-geometry=E2=80=99 as > (frame-geometry)((outer-position 606 . 41) (outer-size 760 . 743) so Emacs and icewm agree about this. Now 41 + 743 give 784 which is clearly larger than the 768 reported by > (display-monitor-attributes-list)(((name . "LVDS-1") (geometry 0 0 136= 6 > 768) (workarea 0 0 1366 768) (mm-size 344 193) (frames # emacs@jidanni5 0x12ffc30>) (source . "Gdk"))) so icewm is (IMHO) to blame for positioning the frame with a vertical offset of 41. In fact, 743 < 768 so the frame should fit if it were positioned "sensibly". I also don't like that your height of the workarea is the same as the height of the monitor. In your snapshot I see a taskbar - is this a taskbar that gets hidden automatically? > (frame-parameters)(... (top . 41) (left . 606) ... > (width . 80) (height . 36) Here you see the position values as before and the default width and height values for your initial frame, 80 x 36. > Now after I grab the window and move it to its proper place on screen:= > I get > 79x35+606+3 > > (display-monitor-attributes-list)(((name . "LVDS-1") (geometry 0 0 136= 6 > 768) (workarea 0 0 1366 768) (mm-size 344 193) (frames # emacs@jidanni5 0x12ffc30>) (source . "Gdk"))) > > (frame-geometry)((outer-position 606 . 3) (outer-size 760 . 743) > (external-border-size 4 . 4) (title-bar-size 0 . 20) (menu-bar-externa= l > . t) (menu-bar-size 752 . 25) (tool-bar-external . t) (tool-bar-positi= on > . top) (tool-bar-size 752 . 42) (internal-border-width . 0)) Clearly with a vertical offset of 3 the frame fits. > That's all. The only special thing about my icewm set up is > $ find .icewm/ -size 0 > .icewm/menu > .icewm/toolbar > .icewm/keys Do you have any other "fairly large window" say in the 750 pixels height category that gets positioned off screen in a similar way? Also, do you have any Emacs related settings in some .Xresources? > In my maximized window, there is no icewm size command available, and = I get > > (display-monitor-attributes-list)(((name . "LVDS-1") (geometry 0 0 136= 6 > 768) (workarea 0 0 1366 768) (mm-size 344 193) (frames # E06:53macs 0x12ffc30>) (source . "Gdk"))) > > (frame-geometry)((outer-position -4 . -4) (outer-size 1368 . 748) > (external-border-size 4 . 4) (title-bar-size 0 . 20) (menu-bar-externa= l > . t) (menu-bar-size 0 . 0) (tool-bar-external . t) (tool-bar-position = =2E > top) (tool-bar-size 0 . 0) (internal-border-width . 0)) These figures look good: The outer window is set off by -4 pixels so the external border is not shown on either side. Correct? In addition it seems to leave 768 - 748 - 8 that is 28 pixels for the taskbar (the lower external border is drawn below the taskbar, I presume). So there isn't much Emacs itself can do about this. From you snapshot it isn't clear to me whether the xterm window is fully visible - IIUC it also gets partly hidden beneath the taskbar. This would hint at a problem with icewm not recognizing your taskbar. (I don't assume that the xterm window is maximized - this would contradict your statement that a maximized window like the Emacs one is shown correctly.) Obviously, you could try, in your .emacs, to either reduce the initial or default height of your frame but this sounds ludicrous given the fact that icewm deliberately throws away part of the available space. Also you could explicitly ask for an initial position which is, however, silly because it overrides the placement strategy of the window manager. You could explicitly specify the =E2=80=98top=E2=80=99 value alone like i= n (setq default-frame-alist '((top . 3))) to get rid of the manual readjustment but I have no idea whether your window manager will like it. Or try another window manager ... martin