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: Mon, 05 Jun 2023 17:56:38 -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> 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="30987"; 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 Mon Jun 05 23:57:34 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 1q6ICk-0007tL-Hb for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Jun 2023 23:57:34 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6ICG-0008KU-Ju; Mon, 05 Jun 2023 17:57:04 -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 1q6ICF-0008KJ-5x for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2023 17:57: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 1q6ICE-00087q-U4 for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2023 17:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q6ICE-0004d3-Q2 for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2023 17:57: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: Mon, 05 Jun 2023 21:57: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.168600220617747 (code B ref 62164); Mon, 05 Jun 2023 21:57:02 +0000 Original-Received: (at 62164) by debbugs.gnu.org; 5 Jun 2023 21:56:46 +0000 Original-Received: from localhost ([127.0.0.1]:50452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6IBy-0004cB-5h for submit@debbugs.gnu.org; Mon, 05 Jun 2023 17:56:46 -0400 Original-Received: from mxout6.mail.janestreet.com ([64.215.233.21]:53709) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6IBw-0004bu-G0 for 62164@debbugs.gnu.org; Mon, 05 Jun 2023 17:56:45 -0400 In-Reply-To: <83ild19uzd.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 09 May 2023 22:15:50 +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:263032 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> Cc: Po Lu , 62164@debbugs.gnu.org >> From: Spencer Baugh >> Date: Tue, 09 May 2023 14:27:11 -0400 >> >> +(defcustom ediff-x-utility-control-frame nil >> + "If non-nil, the control frame is a utility window under X. >> + >> +This is useful in tiling window managers, where this will cause >> +the control frame to be floating rather than tiled. It should be >> +harmless on other well-behaved window managers." > > If this option causes the control frame to be floating rather than > tiled, the name of the option should reflect that. Using "utility" in > the name of the variable makes the option less self-explanatory, > because that technical terms is not relevant on the user level. > > Thanks. Agreed. Revised patch attached: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Allow-setting-the-ediff-control-frame-as-a-utility-w.patch >From 8725b7376b3e6ddaaa4389d363bd9da56bf3eedb Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Tue, 9 May 2023 14:22:29 -0400 Subject: [PATCH] Allow setting the ediff control frame as a utility window 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-x-utility-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..e50df599a98 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-x-floating-control-frame nil + "If non-nil, the control frame is a utility window under X. + +This is useful in tiling window managers, where this will cause +the control frame to be floating rather than tiled. It should be +harmless on other well-behaved window managers." + :type '(choice (const :tag "Control frame is utility window" t) + (const :tag "Control frame is normal window" 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-x-floating-control-frame (eq window-system '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 --=-=-=--