Re: [Sawfish] Testing a workaround for GTK3 random resizes |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/sawfish Archives
]
- To: sawfish@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [Sawfish] Testing a workaround for GTK3 random resizes
- From: Christopher Roy Bratusek <nano@xxxxxxxxxxx>
- Date: Fri, 25 Aug 2017 18:51:26 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=jpberlin.de; h= content-transfer-encoding:content-language:content-type :content-type:in-reply-to:mime-version:user-agent:date:date :message-id:from:from:references:subject:subject:received :received; s=mail20140220; t=1503679891; bh=u3b50u6xmumr+8XF+fTa qs0FBwJqq7E11EgTRr5jfc8=; b=UcizpBCt39ZgsHKWtF7KW4hQrjnLila9l1zo eEG0vBkOpNJ2g+cq7Y/fGIJGcwcJ9V1mnaxOT4QBISy0WJSl44aj90dg/4LhPUhX GQWL3JsWDtZymYw7FU6UOicF+aO8QRuwktKnw1B37vtFP5zuXHLr1kxbgM4Kce5R 7Poqm2xrk6hWs1QGDlaoTUXrvFSTsLWZqYY8Tbu5XIhDAU6bzPiHTIkiTJf6UDs+ tXRLFftq/myDbqVA7PxxGJUYvBNegS2JjwQal5JtOpdadCl4Tbm/x8xLM4H8KQhL rPQOPAvMDdIQ99yzALfJdembAtA8Dr5g2cSP+SDB+X9TZGQIFRNGTBv/tr30U6lM 8TT+MOmObfx3Yfuz67bJoWb+7H1QyYj3PH7NXHoiBi2sJFvAUlAIvDlPEfQtUn9g zB8Ojl7lmoD4fYuP43/AEF2WBNeyfL62B7uTF+IgGjSoxGSyYMntif5oNVfaNNq4 cljA81UdrZXAV9Ifqsu9KVwMaFwdMKe867DEDZtQ4w8CoVluff2u76wDmKDk6o0q ogRsdbCnzw2UBPEIEPC1sxl+y8AXfgVp4AOuY0NoyTMekqiA1UGcQZp2JmnpL1qD 2ooo/17lrRsGrNplNz0ICrx7uOs+Q/ekxFw1uTfOubh/H/S02C84hpyLoHNl3PKC 8Q3GZO0=
.... 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