From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#62164: 29.0.60; ediff behaves poorly by default on tiling window managers Date: Wed, 28 Jun 2023 08:55:13 -0400 Message-ID: References: <87cz5c87xg.fsf@yahoo.com> <878rg087v5.fsf@yahoo.com> <87a60c3zuc.fsf@yahoo.com> <871ql3nj6y.fsf@catern.com> <871ql2su9q.fsf@yahoo.com> <87v8iemsbh.fsf@catern.com> <83ild19uzd.fsf@gnu.org> <83y1kw3k3d.fsf@gnu.org> <83leg3vlzf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40198"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: luangruo@yahoo.com, sbaugh@catern.com, 62164@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 28 15:21:16 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 1qEV6h-000AA8-IL for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Jun 2023 15:21:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEUia-0002zp-Ta; Wed, 28 Jun 2023 08:56:24 -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 1qEUiK-0002pn-4z for bug-gnu-emacs@gnu.org; Wed, 28 Jun 2023 08:56:04 -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 1qEUiI-0002LZ-Tu for bug-gnu-emacs@gnu.org; Wed, 28 Jun 2023 08:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qEUiI-0006Er-Ai for bug-gnu-emacs@gnu.org; Wed, 28 Jun 2023 08:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Jun 2023 12:56:02 +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.168795692223924 (code B ref 62164); Wed, 28 Jun 2023 12:56:02 +0000 Original-Received: (at 62164) by debbugs.gnu.org; 28 Jun 2023 12:55:22 +0000 Original-Received: from localhost ([127.0.0.1]:50259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEUhd-0006Dn-JK for submit@debbugs.gnu.org; Wed, 28 Jun 2023 08:55:22 -0400 Original-Received: from mxout5.mail.janestreet.com ([64.215.233.18]:54447) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEUha-0006DY-AF for 62164@debbugs.gnu.org; Wed, 28 Jun 2023 08:55:20 -0400 In-Reply-To: <83leg3vlzf.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 28 Jun 2023 14:56:36 +0300") 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:264216 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Spencer Baugh >> Cc: luangruo@yahoo.com, sbaugh@catern.com, 62164@debbugs.gnu.org >> Date: Tue, 27 Jun 2023 21:13:09 -0400 >> >> * lisp/vc/ediff-wind.el (ediff-x-utility-control-frame): Add >> defcustom. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > Copy/pasta, right? > >> +(defcustom ediff-x-floating-control-frame nil > > A better name is ediff-floating-control-frame. > >> + "If non-nil, the control frame will float under most X WMs. >> + >> +The control frame will be give the window type \"utility\". On >> +most tiling window managers, this will cause the control frame to >> +be floating rather than tiled. It should be harmless on other >> +well-behaved window managers." > > I would document this slightly differently: > > If not-nil, try making the control frame be floating rather than tiled. > > If your X window manager makes the Ediff control frame a tiled one, > set this to a non-nil value, and Emacs will try to make it floating. > This only has effect on X displays. OK, fixed these: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Allow-floating-the-ediff-control-frame-under-X.patch >From 5aea062fee4f265be146fd7df730ab077b31bb82 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Tue, 9 May 2023 14:22:29 -0400 Subject: [PATCH] Allow floating the ediff control frame under X This is a step in the direction of making ediff behave better by default under tiling window managers and fixing bug#62164. * lisp/vc/ediff-wind.el (ediff-floating-control-frame): Add defcustom. (ediff-frame-make-utility, ediff-setup-control-frame): Allow setting the control frame up as a utility window under X. (bug#62164) --- lisp/vc/ediff-wind.el | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el index eb903f093f9..74e0e1f9b9f 100644 --- a/lisp/vc/ediff-wind.el +++ b/lisp/vc/ediff-wind.el @@ -69,6 +69,16 @@ ediff-window-setup-function (function :tag "Other function")) :version "24.3") +(defcustom ediff-floating-control-frame nil + "If not-nil, try making the control frame be floating rather than tiled. + +If your X window manager makes the Ediff control frame a tiled one, +set this to a non-nil value, and Emacs will try to make it floating. +This only has effect on X displays." + :type '(choice (const :tag "Control frame floats" t) + (const :tag "Control frame has default WM behavior" nil)) + :version "30.1") + (ediff-defvar-local ediff-multiframe nil "Indicates if we are in a multiframe setup.") @@ -873,6 +883,16 @@ ediff-window-ok-for-display (not (ediff-frame-has-dedicated-windows (window-frame wind))) ))) +(defun ediff-frame-make-utility (frame) + (let ((x-fast-protocol-requests t)) + (x-change-window-property + "_NET_WM_WINDOW_TYPE" '("_NET_WM_WINDOW_TYPE_UTILITY") + frame "ATOM" 32 t) + (x-change-window-property + "WM_TRANSIENT_FOR" + (list (string-to-number (frame-parameter nil 'window-id))) + frame "WINDOW" 32 t))) + ;; Prepare or refresh control frame (defun ediff-setup-control-frame (ctl-buffer designated-minibuffer-frame) (let ((window-min-height 1) @@ -948,6 +968,8 @@ ediff-setup-control-frame (goto-char (point-min)) (modify-frame-parameters ctl-frame adjusted-parameters) + (when (and ediff-floating-control-frame (eq (window-system ctl-frame) 'x)) + (ediff-frame-make-utility ctl-frame)) (make-frame-visible ctl-frame) ;; This works around a bug in 19.25 and earlier. There, if frame gets -- 2.39.3 --=-=-=--