How can I disable CSD (client side decorations)?

Steve Dodier-Lazaro sidi at xfce.org
Wed Jun 15 22:25:22 CEST 2016


(posted from the wrong email address, see my answer below)

On 15 June 2016 at 21:24, Steve Dodier-Lazaro <sidnioulz at gmail.com> wrote:

> Hi,
>
> You will need two things. First, disable CSD shadows in GTK+. Second,
> force xfwm4 to draw SSD decorations on CSD clients.
>
> # Disable CSD shadows
>
> Create a file called ~/.config/gtk-3.0/gtk.css and put this inside:
>
> .window-frame, .window-frame:backdrop {
>   box-shadow: 0 0 0 black;
>   border-style: none;
>   margin: 0;
>   border-radius: 0;
> }
> .titlebar { border-radius: 0; }
> window.background.csd decoration { box-shadow: none; margin: 0;}
>
> This should cover both GTK+ 3.20 and prior.
>
> # Patch xfwm4 to always draw a decoration
>
> Well, I don't remember. It's 2 or 3 lines of the code somewhere in this
> commit:
> https://github.com/Sidnioulz/SandboxXfwm4/commit/997566867fe4beec63fb7ba449a1d7cf6d8d5d75
> or that one:
> https://github.com/Sidnioulz/SandboxXfwm4/commit/d940b107a5fd4aea40165a9e0d3770867001d6cc
> Or maybe that one:
> https://github.com/Sidnioulz/SandboxXfwm4/commit/df1494a34f180e8e6f81c8b2a516988a7c797bb2
>
> Point is you probably shouldn't try to do it! ;-) But I think you have to
> both set the FLAG_SET (c->xfwm_flags, XFWM_FLAG_HAS_BORDER); (as in the
> third commit) for your CSD windows, and to change some draw events like in
> the first commit on src/events.c (by making those branches I modify true by
> default).
>
> PLEASE NOTE CAREFULLY. THERE WILL BE SIDE EFFECTS. Your notification
> bubbles, panel and whatnot will all start having decorations. Did I mention
> you should not try to do this?
>
>
> More seriously now. I think someone has a LD_PRELOAD library lying
> somewhere on the Internet that forces GTK+3 to not draw a header bar and to
> use a normal decoration instead. But I have no idea where it is and how
> stable it is. The only supported way of enforcing a SSD is to ignore the
> fact that the client wants to draw their own decoration and always draw on.
> The gtk.css bit is just a courtesy to make it look less clunky. Yes, you
> will have double decorations. That is unavoidable (and, I should say, not
> Xfce's fault in the slightest).
>
> Best of luck,
>
> On 15 June 2016 at 21:01, Klaus Zeitler <info at klauszeitler.de> wrote:
>
>> Hello,
>> seems that Xfce 4.12, that comes with openSUSE 42.1, has now enabled CSD.
>> Some applications, e.g. eog, evince, gedit etc. pop up without the
>> usual frames and header bar. I guess this is due to GTK 3 CSD.
>> I would have thought, that there should be a (fairly) simple way
>> to turn CSD off, but I couldn't find anything (neither in GTK docu nor
>> for Xfce). I hope I just missed it. The only thing I found (but haven't
>> tried yet) is gtk3-nocsd. This looks like quite desperate measures.
>> Is there a way to turn CSD feature off in Xfce or in GTK config?
>>
>> Klaus
>>
>> --
>>  -------------------------------
>> |  Klaus Zeitler                |
>> |  Email: info at klauszeitler.de  |
>>  -------------------------------
>> ---
>> Oliver's Law:
>>  Experience is something you don't get until just after you need it.
>> _______________________________________________
>> Xfce mailing list
>> Xfce at xfce.org
>> https://mail.xfce.org/mailman/listinfo/xfce
>> http://www.xfce.org
>
>
>
>
> --
> Steve Dodier-Lazaro
> PhD Student
> University College London
> Free Software Developer
>



-- 
Steve Dodier-Lazaro
Xfce Design SIG / Security SIG
Free Software Developer
OpenPGP : 1B6B1670
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.xfce.org/pipermail/xfce/attachments/20160615/2d9124ba/attachment.html>


More information about the Xfce mailing list