Subject: Re: bug#62164: 29.0.60; ediff behaves poorly by default on tiling window managers

From: Po Lu <[email-masked]>
Date: Tue, 14 Mar 2023 08:59:07 +0800

Spencer Baugh <[email-masked]> writes:

> ediff defaults to a multiframe UI on graphical displays.  If the user is
> running a tiling window manager on X, the control panel frame gets tiled
> and the whole thing becomes either very ugly or unusable.
>
> This is a very long-standing bug, but it should be fixed.  Most tiling
> window manager users work around this with:
>
> (setq ediff-window-setup-function 'ediff-setup-windows-plain)
>
> But I would rather the multiframe UI just work correctly by default.

Maybe such users could be taught to make the utility window
override-redirect instead.

> On X, perhaps we should set _NET_WM_WINDOW_TYPE to
> _NET_WM_WINDOW_TYPE_UTILITY for the ediff control panel frame, so that
> tiling window managers float the control panel frame frame by default.
> This would probably need to be a new frame parameter specific to X.  I
> can try to make that change if that seems reasonable.  (This would also
> be useful for allowing other packages to have multiframe UI modes.)

The ediff control frame is not a utility frame because you are supposed
to type in it.

One window manager which extensively uses keyboard navigation (I'm not
sure I remember which) applies the No Input focus model to
_NET_WM_WINDOW_TYPE_UTILITY, not letting you type in such toplevel
windows.

> I'm not sure what we'd do for other windowing systems.  Probably the
> only other platform where tiling window managers are at all common is
> Wayland; perhaps there's some way to set this hint through PGTK?

No, Wayland doesn't provide any of this, unless you use a protocol that
is exclusive to GNOME Shell.  Popups are instead supposed to be
implemented as xdg_popup windows and not xdg_toplevels, or toplevels
transient for another toplevel.  The former is technically infeasible
under GTK, and the latter results in the control frame obscuring
everything else.