From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#62164: 29.0.60; ediff behaves poorly by default on tiling window managers Date: Sun, 02 Apr 2023 13:55:13 +0800 Message-ID: <871ql2su9q.fsf@yahoo.com> References: <87cz5c87xg.fsf@yahoo.com> <878rg087v5.fsf@yahoo.com> <87a60c3zuc.fsf@yahoo.com> <871ql3nj6y.fsf@catern.com> Reply-To: Po Lu 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="22376"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Spencer Baugh , 62164@debbugs.gnu.org To: sbaugh@catern.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 02 07:56:23 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 1piqhT-0005c1-2T for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Apr 2023 07:56:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1piqhB-0007s9-Lj; Sun, 02 Apr 2023 01:56:05 -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 1piqh8-0007rt-BX for bug-gnu-emacs@gnu.org; Sun, 02 Apr 2023 01:56:03 -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 1piqh8-0005mn-36 for bug-gnu-emacs@gnu.org; Sun, 02 Apr 2023 01:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1piqh7-00020k-N7 for bug-gnu-emacs@gnu.org; Sun, 02 Apr 2023 01:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Apr 2023 05:56: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.16804149327693 (code B ref 62164); Sun, 02 Apr 2023 05:56:01 +0000 Original-Received: (at 62164) by debbugs.gnu.org; 2 Apr 2023 05:55:32 +0000 Original-Received: from localhost ([127.0.0.1]:39010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1piqgd-000201-Q5 for submit@debbugs.gnu.org; Sun, 02 Apr 2023 01:55:32 -0400 Original-Received: from sonic304-20.consmr.mail.ne1.yahoo.com ([66.163.191.146]:33644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1piqga-0001zn-FT for 62164@debbugs.gnu.org; Sun, 02 Apr 2023 01:55:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1680414922; bh=faJLD/u4Bnma60p1gu3iyxvkX8jz0+wd9x8pWmoEphs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=YR/umTSVpx/fYYUst3QEZW0J3QSvQRQtAKbFYceuuaPRefk1DMxGPFP5U/ItTAlFXBcuNjIXijIOuMRzFxC0/HVbPkPZWRDHthvir2o8INS1LI7V557tU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ZUQor.zLRLrsJJXBR5FD2szqINb2t yhmfn.zo6HFPIItzO4e0AC8AByyOXe74CTljJAcZcdpzNTm3p.rYyveqehBkPt2rCmF3KUgcYhug ecANKfpg8akQBi6SNzz2rWDBWaaO.lWdM.jEMhM4lA.IPVOq00wfBRFpXZmHahh9iX38vqQrQ1gQ 3K5hgTJp81uyVr2fK0j2vg0qxeyBMvxfQM9ZFNaZDpEj08VNG1NVzAN8b.7NBMTgYnoBL7tpudBL JzUo.BghjZ2bVekAHViFwJIh7yoak.I5m0rvp.qfxv7ILIkFfA6LVA7GWq1rtm7X_uWFnThzmPdU CKcQEVolKp.SqQtPGGOVfu09XtTJz4KsfwjndlB0A5gk8ATsY9TEXsgZY43RrG_X2c.NQ1YEdGF. ZPzDvtqgIoQvxywuu7Hbb7PL4x06Zi3qAH3i.QB8g6ZD4xvIxb7UdI3k7oyJ8mXqRMPd8acbMjGI ZbjDrzFXoJ4thuuGckT0iBxA0wD52KbrMf1eJRfauG X-Sonic-MF: X-Sonic-ID: 4280cad7-03c6-4eec-a34b-b9ba8efd9f84 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ne1.yahoo.com with HTTP; Sun, 2 Apr 2023 05:55:22 +0000 Original-Received: by hermes--production-sg3-6d6fb994f6-94jgf (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 2a344fd0636a1bc066dfe9dc66088615; Sun, 02 Apr 2023 05:55:17 +0000 (UTC) In-Reply-To: <871ql3nj6y.fsf@catern.com> (sbaugh@catern.com's message of "Sun, 02 Apr 2023 01:53:26 +0000 (UTC)") X-Mailer: WebService/1.1.21284 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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:259093 Archived-At: sbaugh@catern.com writes: > Po Lu writes: >> Spencer Baugh writes: >>> On Mon, Mar 13, 2023 at 8:59=E2=80=AFPM Po Lu wrot= e: >>>> 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=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=20 > ;; This works around a bug in 19.25 and earlier. There, if frame ge= ts > -- I think it is fine to make it a user option, but not the default. BTW, it is generally The Right Thing to bind `x-fast-protocol-requests' to t around functions which make X requests when those functions are not being debugged. Thanks.