From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Gergely_Risk=C3=B3?= Newsgroups: gmane.emacs.devel Subject: tiling window managers and alignment of frames Date: Mon, 12 Feb 2024 04:17:18 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38551"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Feb 12 04:18:33 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rZMq0-0009rT-KH for ged-emacs-devel@m.gmane-mx.org; Mon, 12 Feb 2024 04:18:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZMp7-0004PL-GX; Sun, 11 Feb 2024 22:17:37 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZMp4-0004ON-H3 for emacs-devel@gnu.org; Sun, 11 Feb 2024 22:17:34 -0500 Original-Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rZMp3-000780-1E for emacs-devel@gnu.org; Sun, 11 Feb 2024 22:17:34 -0500 Original-Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a3be9edf370so298483766b.2 for ; Sun, 11 Feb 2024 19:17:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707707850; x=1708312650; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=qpsIXOMHVhI2L1lrPkRBixt7uiI8gQaEtaMqqB6jCR0=; b=OLkZmdlGrzO4hGIIMIT56A8KqUsUXhIxBtv2zvUthVulnUOG9M+fhVFAK6USg8fvjI 9u6W7ss6+snjlQBT4c+e4fZivczlNHKLuyqpBRlGQAAThWZvtw7ZFLXGqq68798rFMlS BM2wBFd9XT72wiFRi/0JkrTHW/ZfPyciqBK8deOurUf2ZphGnl9+yd/f1ZIc6PSwRNxi /uW3svbHIXl45uAyNyIDXE+oerWQRiAPwBs05T7QMBIB4xZibrp4HCFeIffxppt1nUUE mxsnaiDcy4pCoqUBHTTyN/DOs0ehfQRFRxweCJBLKJwUIeUk6c0BX+QFi7aH0V+SaYxh iCZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707707850; x=1708312650; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=qpsIXOMHVhI2L1lrPkRBixt7uiI8gQaEtaMqqB6jCR0=; b=QOz9TOcvdlfbcZVFrPJwUpDvqfPvmR+63McK2nDgZdeXFacN8QbK73E9BG66NlUYLQ rVwn75SxoOMRdQheMbN8G0+RiLufFVsbT6yjwi+8DLPZJizIkKtw7ESE6GGZbPHghjZd 8MUrmvjP0I1TmVirmMCDmMZD34D7ABE8P/D2XijNKYiVHT9sR1H5p4yOg16YSxbBpjsd 9N3HFuEdWCvvUZE24Dvm7I5RsLT8Fu/haK6cU2szm/DfjAoHldQQbkaOqqHWJXa8Z/EA CKeL0fe6C2GvJfY4v6u/vwjZYx4C3FCQFQ8wtvcO6ppTgn3pc8cSUQi1WFyUmwHDV1cd QO/Q== X-Gm-Message-State: AOJu0YwbwBWVGa5DuWQ9bFogofNlwEhTQiLnZijMx+Zhv50qgVljAMYm Ay/ywvEWbdJuPOqepPxPWqLyvnB3gG7jP4zYNPLiqUZnDgN+0+JzUPQwMj7h2BMuuYPvp8WtN1r 2dN2ScInjcimp+8mnzGY9UaN15wYvUoj9jII= X-Google-Smtp-Source: AGHT+IHH8h4d2dcDsWtlvVp1bvo9pHjoMh9phABxqGSwGJeEI9jLUyTHW3dWH4alkd8z9Mim5fuVoYuFKLYSvD3lMqc= X-Received: by 2002:a17:906:abcd:b0:a3c:9a23:f54a with SMTP id kq13-20020a170906abcd00b00a3c9a23f54amr1122933ejb.32.1707707849775; Sun, 11 Feb 2024 19:17:29 -0800 (PST) Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=gergely.risko@gmail.com; helo=mail-ej1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316121 Archived-At: 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? Cheers, Gergely