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: Tue, 09 May 2023 14:27:11 -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> 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="28128"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Po Lu , 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 Tue May 09 20:28:18 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 1pwS4Q-00077p-KB for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 May 2023 20:28:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pwS4C-0006j1-JP; Tue, 09 May 2023 14:28: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 1pwS4A-0006ib-OS for bug-gnu-emacs@gnu.org; Tue, 09 May 2023 14:28: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 1pwS4A-0005jM-G5 for bug-gnu-emacs@gnu.org; Tue, 09 May 2023 14:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pwS4A-0004EE-BP for bug-gnu-emacs@gnu.org; Tue, 09 May 2023 14:28: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: Tue, 09 May 2023 18:28: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.168365684016207 (code B ref 62164); Tue, 09 May 2023 18:28:02 +0000 Original-Received: (at 62164) by debbugs.gnu.org; 9 May 2023 18:27:20 +0000 Original-Received: from localhost ([127.0.0.1]:44448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwS3T-0004DL-TW for submit@debbugs.gnu.org; Tue, 09 May 2023 14:27:20 -0400 Original-Received: from mxout5.mail.janestreet.com ([64.215.233.18]:37733) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwS3S-0004D2-8e for 62164@debbugs.gnu.org; Tue, 09 May 2023 14:27:19 -0400 In-Reply-To: <87v8iemsbh.fsf@catern.com> (sbaugh@catern.com's message of "Sun, 02 Apr 2023 11:33:55 +0000 (UTC)") 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:261441 Archived-At: --=-=-= Content-Type: text/plain Here's a patch which supports making the control frame into a utility window with a user option. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Allow-setting-the-ediff-control-frame-as-a-utility-w.patch >From f23dc72acd370ace6fd934f46e1d6f9a72f943bf 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..9eaed48f16c 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-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." + :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-utility-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.30.2 --=-=-=--