From: Eli Zaretskii <eliz@gnu.org>
To: "Gergely Riskó" <gergely.risko@gmail.com>, "Po Lu" <luangruo@yahoo.com>
Cc: emacs-devel@gnu.org
Subject: Re: tiling window managers and alignment of frames
Date: Thu, 15 Feb 2024 10:30:26 +0200 [thread overview]
Message-ID: <86o7ciw2n1.fsf@gnu.org> (raw)
In-Reply-To: <CAMhZOOy_W6TptgXhegXpmNAHNN-t5JWbUJ6aoGzy41h4NN5_Mg@mail.gmail.com> (message from Gergely Riskó on Mon, 12 Feb 2024 04:17:18 +0100)
> From: Gergely Riskó <gergely.risko@gmail.com>
> Date: Mon, 12 Feb 2024 04:17:18 +0100
>
> Hi,
>
> I'm using GNU Emacs 29.1 lucid (X toolkit).
>
> In my setup, I only use fixed height fonts and all windows use the
> same font size, modeline has no extra line-space and internal frame
> border is set to 0. Therefore if the height of a frame is divisible
> by (frame-char-height), the display is always guaranteed to be pixel
> perfect: no lines in any of the buffers with vertically half displayed
> lines, which looks nice.
>
> Emacs has good configurability to keep this setup going: by default
> resize of frames is happening by (frame-char-height), and that
> behavior is quite nice, if I resize Emacs frames with a WM, the size
> of the frame keeps the divisibility by (frame-char-height).
>
> Now, the problem is, that I'm using a tiling window manager (i3), and
> that ignores the size hints from Emacs when in tiling mode and just
> forces an arbitrary height. And as a response to this, Emacs just
> assigns the extra pixels in the middle of the layout to one of the
> windows.
>
> I'd like to have a variable (e.g. frame-resize-force-char-height) that
> tells Emacs that if all of the following is true:
>
> - frame-resize-force-char-height == t
> - && frame-resize-pixelwise == nil
> - && rem != 0
> (where rem := (frame-pixel-height) % (frame-char-height))
>
> then, the display engine should:
>
> - skip rem number of pixels right on top (or bottom) of the frame,
> - and just use the background frame color for this vertical skip.
>
> This is the behavior of xterm and urxvt (with the extra pixel lines
> being allocated to the bottom of the x11 window), and I'd like to have
> the same for my Lucid Emacs.
>
> Is this possible or already implemented and did I just miss it? I
> tried to do my research for a couple of hours, but didn't find it.
> Would it be difficult to add this to redisplay? Is there any other
> workaround I could try to ensure that my windows never have halved
> displayed lines (until I keep my fonts all the same height in every
> window)?
>
> Of course, my window manager could be intelligent enough to do this on
> the tiling side, but I don't think it would be easy to convince them,
> as they are pretty happy with the status of i3 as it is.
>
> Any ideas?
Po Lu, any comments or suggestions?
prev parent reply other threads:[~2024-02-15 8:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-12 3:17 tiling window managers and alignment of frames Gergely Riskó
2024-02-15 8:30 ` Eli Zaretskii [this message]
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=86o7ciw2n1.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=gergely.risko@gmail.com \
--cc=luangruo@yahoo.com \
/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).