Re: [Sawfish] Testing a workaround for GTK3 random resizes

[ Thread Index | Date Index | More lists.tuxfamily.org/sawfish Archives ]


.... now to the list aswell.

Hi GSR,

thanks for the patch, I'll have a look at this issue soon™, though I
don't have any CSD-utilizing application installed. All my GTK+3
applications in use, use normal titlebars.

On Debian GNU/Linux you can install gtk3-nocsd. Package description:

"gtk3-nocsd LD_PRELOADs a small library to disable the client side
decorations (CSD) of Gtk+ 3.

Since Gtk+ 3.10, its developers added a so-called header bar or custom
title bar. With this and the client-side decoration, the original
title bar and window border provided by the window manager are
disabled by Gtk+. This makes all Gtk+ 3 programs look like alike, but
have different handling from other windows on non-GNOME desktops. Even
worse, this may break some window manager or compositors.

Unfortunately, there is no reliable way of turning off CSDs in Gtk+
directly. This library makes this possible."

The project Homepage: https://github.com/PCMan/gtk3-nocsd

That's of course not a fix, but a workaround (or let's call it a fix, if
you're as much as annoyed about CSD as I am).

Regards,
Chris

Am 12.07.2017 um 23:42 schrieb GSR - FR:
> Hi:
> 
> Updated a program, and it uses GTK3 now. And so managed to see what
> others mentioned a year or so ago about mouse getting stuck into
> resize mode. After some web searchs it seems the issue hit other
> window managers and clients (audacious, xfce4, i3, openbox, etc) in
> diverse ways (crashes, jumps, resizes, etc). With that info, I tried
> something. So far, it works.
> 
> See attached file (for simplicity) and patch ready for git am (for
> easy integration into tree). In case list drops them use this diff
> adapted to latest Sawfish tarball, just patch the file
> sawfish_1.12.0/lisp/sawfish/wm/state/wm-spec.jl with the following:
> 
> ---8<---
> --- wm-spec.jl	2017-07-11 05:09:12.356975626 +0200
> +++ wm-spec.jl-1.12.0	2016-08-13 10:26:23.000000000 +0200
> @@ -58,7 +58,6 @@
>    (defconst _NET_WM_MOVERESIZE_MOVE 8)
>    (defconst _NET_WM_MOVERESIZE_SIZE_KEYBOARD 9)
>    (defconst _NET_WM_MOVERESIZE_MOVE_KEYBOARD 10)
> -  (defconst _NET_WM_MOVERESIZE_CANCEL 11)
>  
>    (defconst _NET_WM_STATE_REMOVE 0)
>    (defconst _NET_WM_STATE_ADD 1)
> @@ -95,7 +94,6 @@
>       _NET_WM_MOVERESIZE_SIZE_TOPRIGHT
>       _NET_WM_MOVERESIZE_SIZE_KEYBOARD
>       _NET_WM_MOVERESIZE_MOVE_KEYBOARD
> -     _NET_WM_MOVERESIZE_CANCEL
>       _NET_WM_PING
>       _NET_WM_STATE
>       _NET_WM_STATE_ABOVE
> @@ -524,11 +522,7 @@
>  			     '(left))
>  			    ((eq mode _NET_WM_MOVERESIZE_SIZE_RIGHT)
>  			     '(right)))))
> -                 ;; XXX ignore CANCELs for now
> -                 ;; XXX see reports about GTK3 going into resize randomly
> -                 ;; XXX probably need to rework all this block
> -                 (if (not (eq mode _NET_WM_MOVERESIZE_CANCEL))
> -                     (resize-window-interactively w))))))
> +		 (resize-window-interactively w))))))
>  
>  	((_NET_NUMBER_OF_DESKTOPS)
>  	 (set-number-of-workspaces (aref data 0)))
> --->8---
> 
> You can also put a patched file in ~/.sawfish/lisp/sawfish/wm/state/
> and it will override the default one. Tests can be done live with
> ",reload sawfish.wm.state.wm-spec" in sawfish-client. No need of
> (re)building SF to just test the idea.
> 
> Now I get moves when dragging (not plain click) from different blank
> spaces (if that is also a bug and not WinAmp-philia... *sigh*). I
> tried gtk3-widget-factory program and even managed to drag by clicking
> with care between the client top buttons. In Firefox space in menu &
> tab bar allows moving, but other places don't. What rules decide which
> empty space becomes "move all window" and which doesn't? Where are the
> visual clues to represent it? Resize areas are also invisible (near
> window edges), but at least the cursor changes when passed over them.
> 
> I am still trying to figure the technical whys and hows behind the new
> thing (the non technical points to CSD and the WinAmp way, because
> their way or the highway). Probably best explanation so far is
> https://bugzilla.icculus.org/show_bug.cgi?id=5460#c7
> With that and the spec, it seems to be something like user pressing
> Esc (SF default) but initiated via client program.
> 
> Inspiration for patch came from things like:
> https://bugs.launchpad.net/ubuntu/+source/xfwm4/+bug/1001936
> https://bbs.archlinux.org/viewtopic.php?id=140530
> http://cr.i3wm.org/patch/699
> http://redmine.audacious-media-player.org/issues/407
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=675991
> Just in case anyone wants to investigate more.
> 
> Please test and report results,
> GSR
>  
> 

-- 
Sawfish ML


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/