Don't listen to repetitive motif hints regarding the window border and prefer rules over them anyway

BUG: 291312
REVIEW: 103681
FIXED-IN: 4.8
icc-effect-5.14.5
Thomas Lübking 2012-01-12 19:01:43 +01:00
parent 7d3f668790
commit e76ecd7c4c
1 changed files with 4 additions and 4 deletions

View File

@ -1987,15 +1987,15 @@ void Client::getMotifHints()
{
bool mgot_noborder, mnoborder, mresize, mmove, mminimize, mmaximize, mclose;
Motif::readFlags(client, mgot_noborder, mnoborder, mresize, mmove, mminimize, mmaximize, mclose);
if (mgot_noborder) {
if (mgot_noborder && motif_noborder != mnoborder) {
motif_noborder = mnoborder;
// If we just got a hint telling us to hide decorations, we do so.
if (motif_noborder)
noborder = true;
noborder = rules()->checkNoBorder(true);
// If the Motif hint is now telling us to show decorations, we only do so if the app didn't
// instruct us to hide decorations in some other way, though.
else if (!motif_noborder && !app_noborder)
noborder = false;
else if (!app_noborder)
noborder = rules()->checkNoBorder(false);
}
if (!hasNETSupport()) {
// NETWM apps should set type and size constraints