Implemented lower window when middle click on titlebar in gtk/mutter

Carsten Haitzler (The Rasterman) raster at rasterman.com
Thu May 7 09:15:41 UTC 2020


On Mon, 4 May 2020 12:08:46 +0200 Mildred Ki'Lya <mildred-ml at mildred.fr> said:

> Hi,
> 
> For a long time I delayed using Wayland on my computer for about three 
> reasons: inability to restart the gnome-shell (Alt-F2, r), slowness in 
> gnome-shell, and inability to lower client-side decorated windows on 
> middle click like on X11. The performance getting better and better (and 
> with the realtime option enabled in mutter) I decided to scratch my itch 
> and implement lowering in waylang for Gtk client-side decorations.
> 
> My work is implemented as an upgrade to the gtk-shell protocol:
> 
> - https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1221
> 
> - https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1821
> 
> It works, but I do not like how it works and the fact that it's Gtk 
> specific (although other toolkits could implement the gtk protocol). 
> Also, I don't like that it's the client that should look up the window 
> manager configuration to know that middle clicking means lowering the 
> window. It's up to the compositor to map the middle click to lower and 
> not the client.
> 
> So I'm asking it here, what would be the wayland solution for a 
> cross-toolkit and cross-environment solution?
> 
> I suppose that the client can declare the title bar area, and the 
> compositor can then handle clicks in this area. is there something like 
> that already existing? Is there anything that has prevented to do this 
> before?

So you want this to only happen when middle-clicking in the titlebar? Then it
does require the client to deal with it as only it knows precisely the things
in a titlebar that are the titlebar (and not other buttons too like close and
what not, and tyring to expose all of this to the compositor to deal with
just is endlessly complex).

So what you need really is clients deal with this. That means every toolkit
and/or app will have to follow suit and do it too.

If you want middle-mouse anywhere to do this (like alt+left mouse drag is
seconded anywhere to move a window). then the compositor can do this with
clients being ignorant of it happening.

> Thank you,
> 
> Mildred
> 
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
Carsten Haitzler - raster at rasterman.com



More information about the wayland-devel mailing list