unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: "積丹尼 Dan Jacobson" <jidanni@jidanni.org>
Cc: 25330@debbugs.gnu.org
Subject: bug#25330: emacs -q always produces an emacs that was partially off screen.
Date: Thu, 05 Jan 2017 11:05:55 +0100	[thread overview]
Message-ID: <586E1A83.6050406@gmx.at> (raw)
In-Reply-To: <87lgutqcay.fsf@jidanni.org>

 > (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 ‘frame-geometry’ 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 1366
 > 768) (workarea 0 0 1366 768) (mm-size 344 193) (frames #<frame
 > 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 1366
 > 768) (workarea 0 0 1366 768) (mm-size 344 193) (frames #<frame
 > 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-external
 > . t) (menu-bar-size 752 . 25) (tool-bar-external . t) (tool-bar-position
 > . 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 1366
 > 768) (workarea 0 0 1366 768) (mm-size 344 193) (frames #<frame
 > 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-external
 > . t) (menu-bar-size 0 . 0) (tool-bar-external . t) (tool-bar-position .
 > 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 ‘top’ value alone like in

(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






  reply	other threads:[~2017-01-05 10:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170108233648.0F03EDF8B9@hapkido.dreamhost.com>
2017-01-02  5:50 ` bug#25330: emacs -q always produces an emacs that was partially off screen 積丹尼 Dan Jacobson
2017-01-02  7:25   ` martin rudalics
2017-01-02 23:20   ` 積丹尼 Dan Jacobson
2017-01-05 10:05     ` martin rudalics [this message]
2019-09-29 16:26       ` Lars Ingebrigtsen
2017-01-05 23:22   ` 積丹尼 Dan Jacobson
2017-01-09  1:13   ` bug#25330: can't send directly to martin 積丹尼 Dan Jacobson
2017-01-09  9:40     ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=586E1A83.6050406@gmx.at \
    --to=rudalics@gmx.at \
    --cc=25330@debbugs.gnu.org \
    --cc=jidanni@jidanni.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).