update SwitcherItem::screenGeometry when showing

not everytime the current screen changes.
a) that pollutes the geometry when the tabbox is invoked
b) it's insufficient for "Active Screen follows mouse" (the default)
c) less overhead (ok: "on multiscreen")

BUG: 337790
CCBUG: 341531
FIXED-IN: 5.4
REVIEW: 124814
This commit is contained in:
Thomas Lübking 2015-08-19 08:08:39 +02:00
parent ede337ff22
commit f96836b2df

View file

@ -43,7 +43,6 @@ SwitcherItem::SwitcherItem(QObject *parent)
}
});
connect(screens(), &Screens::changed, this, &SwitcherItem::screenGeometryChanged);
connect(screens(), &Screens::currentChanged, this, &SwitcherItem::screenGeometryChanged);
}
SwitcherItem::~SwitcherItem()
@ -71,6 +70,8 @@ void SwitcherItem::setVisible(bool visible)
if (m_visible == visible) {
return;
}
if (visible)
emit screenGeometryChanged();
m_visible = visible;
emit visibleChanged();
}