No longer updating the window shape

We don't have the mask for the opaque version anyway, so it does
not make any sense as for composited no mask was set.
This commit is contained in:
Martin Gräßlin 2012-01-09 23:09:15 +01:00
parent d5021ca956
commit fee9a52fd5
2 changed files with 0 additions and 32 deletions

View file

@ -207,7 +207,6 @@ void AuroraeClient::resize(const QSize &s)
{
m_view->resize(s);
widget()->resize(s);
updateWindowShape();
}
void AuroraeClient::shadeChange()
@ -301,7 +300,6 @@ KDecorationDefines::Position AuroraeClient::mousePosition(const QPoint &point) c
void AuroraeClient::reset(long unsigned int changed)
{
if (changed & SettingCompositing) {
updateWindowShape();
AuroraeFactory::instance()->theme()->setCompositingActive(compositingActive());
}
if (changed & SettingButtons) {
@ -338,35 +336,6 @@ bool AuroraeClient::isMaximized() const
return maximizeMode()==KDecorationDefines::MaximizeFull && !options()->moveResizeMaximizedWindows();
}
void AuroraeClient::updateWindowShape()
{
bool maximized = maximizeMode()==KDecorationDefines::MaximizeFull && !options()->moveResizeMaximizedWindows();
int w=widget()->width();
int h=widget()->height();
if (maximized || compositingActive()) {
QRegion mask(0,0,w,h);
setMask(mask);
return;
}
int pl, pt, pr, pb;
padding(pl, pr, pt, pb);
Plasma::FrameSvg *deco = AuroraeFactory::instance()->theme()->decoration();
if (!deco->hasElementPrefix("decoration-opaque")) {
// opaque element is missing: set generic mask
w = w - pl - pr;
h = h - pt - pb;
QRegion mask(pl, pt, w, h);
setMask(mask);
return;
}
deco->setElementPrefix("decoration-opaque");
deco->resizeFrame(QSize(w-pl-pr, h-pt-pb));
QRegion mask = deco->mask().translated(pl, pt);
setMask(mask);
}
void AuroraeClient::titlePressed(int button, int buttons)
{
titlePressed(static_cast<Qt::MouseButton>(button), static_cast<Qt::MouseButtons>(buttons));

View file

@ -130,7 +130,6 @@ public slots:
void titleMouseMoved(Qt::MouseButton button, Qt::MouseButtons buttons);
private:
void updateWindowShape();
QDeclarativeView *m_view;
};