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
This commit is contained in:
Thomas Lübking 2012-01-12 19:01:43 +01:00
parent d57a0a05ab
commit 5f2371a47d

View file

@ -1984,15 +1984,15 @@ void Client::getMotifHints()
{ {
bool mgot_noborder, mnoborder, mresize, mmove, mminimize, mmaximize, mclose; bool mgot_noborder, mnoborder, mresize, mmove, mminimize, mmaximize, mclose;
Motif::readFlags(client, 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; motif_noborder = mnoborder;
// If we just got a hint telling us to hide decorations, we do so. // If we just got a hint telling us to hide decorations, we do so.
if (motif_noborder) 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 // 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. // instruct us to hide decorations in some other way, though.
else if (!motif_noborder && !app_noborder) else if (!app_noborder)
noborder = false; noborder = rules()->checkNoBorder(false);
} }
if (!hasNETSupport()) { if (!hasNETSupport()) {
// NETWM apps should set type and size constraints // NETWM apps should set type and size constraints