finegrain decobutton reload so that it doesn't happen with every max/restore event

This commit is contained in:
Thomas Lübking 2011-04-23 17:17:25 +02:00
parent 2133d56fb6
commit 65237d9c8c

View file

@ -2163,7 +2163,10 @@ void Client::updateAllowedActions(bool force)
return;
// TODO: This could be delayed and compressed - It's only for pagers etc. anyway
info->setAllowedActions(allowed_actions);
if (decoration)
// ONLY if relevant features have changed (and the window didn't just get/loose moveresize for maximization state changes)
const unsigned long relevant = ~(NET::ActionMove|NET::ActionResize);
if (decoration && (allowed_actions & relevant) != (old_allowed_actions & relevant))
decoration->reset(KDecoration::SettingButtons);
}