From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: sbaugh@catern.com Newsgroups: gmane.emacs.bugs Subject: bug#62164: 29.0.60; ediff behaves poorly by default on tiling window managers Date: Sun, 02 Apr 2023 01:53:26 +0000 (UTC) Message-ID: <871ql3nj6y.fsf@catern.com> References: <87cz5c87xg.fsf@yahoo.com> <878rg087v5.fsf@yahoo.com> <87a60c3zuc.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21506"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Spencer Baugh , 62164@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 02 03:54:15 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pimv8-0005Nh-4q for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Apr 2023 03:54:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pimux-0002ya-UF; Sat, 01 Apr 2023 21:54:03 -0400 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 1pimuw-0002yN-NA for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2023 21:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pimuw-0001uG-E4 for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2023 21:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pimuv-00034s-Qz for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2023 21:54:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: sbaugh@catern.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Apr 2023 01:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62164 X-GNU-PR-Package: emacs Original-Received: via spool by 62164-submit@debbugs.gnu.org id=B62164.168040041711795 (code B ref 62164); Sun, 02 Apr 2023 01:54:01 +0000 Original-Received: (at 62164) by debbugs.gnu.org; 2 Apr 2023 01:53:37 +0000 Original-Received: from localhost ([127.0.0.1]:38783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pimuT-000347-KB for submit@debbugs.gnu.org; Sat, 01 Apr 2023 21:53:37 -0400 Original-Received: from s.wrqvtbkv.outbound-mail.sendgrid.net ([149.72.123.24]:26290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pimuR-00033s-R7 for 62164@debbugs.gnu.org; Sat, 01 Apr 2023 21:53:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catern.com; h=from:subject:in-reply-to:references:mime-version:to:cc:content-type: content-transfer-encoding:cc:content-type:from:subject:to; s=s1; bh=7X6i81QbaTtpJ5EsVc7uxUruZumvQx/FGCObW4cGgkE=; b=CgwGlt35U4o9E2tzQ7nFmH9sJ2RZKpDASee9lNmwQt3fULNShGjQtGPZpemgxfgt9qmy YoKxMUlF8/WqfbXTfu0m2xaftlHiU4ifvG0LUGFtSIc3Zp/S4B3yPkTvIZ7/hNUDCMCVgg /8kc59gMFjJrvd0KkCe73aWF7UmthoZvRffdqsUPOqxPqDCJTO+aRNckOebcW6RKJ0xhHo /pDCxx4IlDf23jqYl5D3G78fD2V7C+edHxVNhIY24myeMGCjj6sZ6DFfVmgYCuefn6lMMe DA1vsRLsUQx/tdngRLfMSu5er0qsh8dlSk0Lk4Ozh7lWsw7uQybxSQy+rCL4tbpQ== Original-Received: by filterdrecv-5848969764-pz6sb with SMTP id filterdrecv-5848969764-pz6sb-1-6428E016-1 2023-04-02 01:53:26.216161137 +0000 UTC m=+3378118.425963335 Original-Received: from earth.catern.com (unknown) by geopod-ismtpd-18 (SG) with ESMTP id 1Ez55LFCRVet5qWdldV3aA Sun, 02 Apr 2023 01:53:26.090 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=::1; helo=localhost; envelope-from=sbaugh@catern.com; receiver= Original-Received: from localhost (localhost [IPv6:::1]) by earth.catern.com (Postfix) with ESMTPSA id 3E06760052; Sat, 1 Apr 2023 21:53:25 -0400 (EDT) In-Reply-To: <87a60c3zuc.fsf@yahoo.com> (Po Lu's message of "Fri, 17 Mar 2023 09:56:27 +0800") X-SG-EID: ZgbRq7gjGrt0q/Pjvxk7wM0yQFRdOkTJAtEbkjCkHbIJ07OU6cIUlme/2wczF80EYy9jIBe+ny/m/pexlFnbjJMPnpm4QHzGAIkaVSK6OyLInwLKSGPz5W88u3FD0HnWnDioABLiGJqEL1Jt5MwwoXL5uaHm4tWANx+Obxsit976ACY9PyDqir9jlZAQU0gpubQtnGxeb9wgd2qnstgHzQ== X-Entity-ID: d/0VcHixlS0t7iB1YKCv4Q== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:259083 Archived-At: Po Lu writes: > Spencer Baugh writes: >> On Mon, Mar 13, 2023 at 8:59=E2=80=AFPM Po Lu wrote= : >>> BTW, `x-change-window-property' lets you mess around with window >>> properties if you want. No frame parameter needed. >> >> AFAICT, my tiling window manager (XMonad) makes its tiling vs floating >> decision when the window is first created, so changing the window >> property after the fact doesn't help. I assume most tiling window >> managers behave the same. > > You can withdraw the window prior to mapping it: see > `make-frame-visible' and `make-frame-invisible'. > > Window managers don't care about a window until it is mapped. Thank you for this. With that I was able to put together this simple patch which makes the ediff control window float by default on tiling window managers, or at least on most of them. What do you think about this patch? It would be really nice to have this behavior by default in this way, and I think it would benefit many users. diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el index eb903f093f9..1a09bc4225e 100644 --- a/lisp/vc/ediff-wind.el +++ b/lisp/vc/ediff-wind.el @@ -948,6 +948,19 @@ ediff-setup-control-frame (goto-char (point-min)) =20 (modify-frame-parameters ctl-frame adjusted-parameters) + (if (eq window-system 'x) + (x-change-window-property + "_NET_WM_WINDOW_TYPE" + '("_NET_WM_WINDOW_TYPE_UTILITY") + ctl-frame + "ATOM" 32 + t) + (x-change-window-property + "WM_TRANSIENT_FOR" + (list (string-to-number (frame-parameter nil 'window-id))) + ctl-frame + "WINDOW" 32 + t)) (make-frame-visible ctl-frame) =20 ;; This works around a bug in 19.25 and earlier. There, if frame gets --