Skip to content

Size of `Draw window frame when hovering a button` does not match size of window

In Panel>Items>Window Buttons, I have Draw window frame when hovering a button selected. I also reduced the size of margin and padding in ~/.config/gtk.css, with the following script:

/* slimmer headerbars */
headerbar entry,    
headerbar spinbutton,    
headerbar button,    
headerbar separator {    
    margin-top: 0px;
    margin-bottom: 0px;    
}    
headerbar {    
    min-height: 0px;
    padding: 0;    
    padding-left: 6px;
    padding-right: 5px;    
    margin: 0px;    
    border: 0px;
} 
.csd .subtitle { font-size: 0; }
.csd .title { font-size: 9pt; }
.csd .titlebar>image { -gtk-icon-transform: scale(0.8); padding-left: 7px; }
.csd entry { font-size: 9pt; min-height: 20px;  }
.csd entry image { padding-top: 1px; padding-bottom: 1px; -gtk-icon-transform: scale(0.8); min-height: 0px; }
.csd .titlebar .titlebutton  {background-color: rgba(255,0,0,0); } 

.csd:backdrop, .titlebar:backdrop { background: #393f3f; }
.csd, .titlebar { background: #323737; }
.csd .titlebutton { -gtk-icon-transform: scale(0.8); }

However, this causes the window border frame to be larger than the actual window, when hovering over the menu icon of Gnome applications. See image below (gnome-calculator 40.1-1).

https://i.ibb.co/q5WCzHs/Screenshot-from-2021-06-09-07-48-35.png

Some more information:

5.10.41-1-MANJARO x86_64
xfce4-panel 4.16.3-1
xfwm4 4.16.1-1
gtk3 1:3.24.29-1
lib32-gtk3 3.24.29-1

Please also see discussion here: https://forum.xfce.org/viewtopic.php?pid=63128#p63128 for additional context.

This may be a simple .css fix, or an issue with the xfce4-panel or a xfwm4. Applications without Client Side Decorations (CSD) do not experience this issue.

Edited by TerryChau