Move triggerDecorationRepaint from Client to AbstractClient

remotes/origin/sebas/outputmanagement
Martin Gräßlin 10 years ago
parent 0a82746f91
commit 1659c0b641
  1. 9
      abstract_client.cpp
  2. 1
      abstract_client.h
  3. 9
      client.cpp
  4. 1
      client.h

@ -57,6 +57,8 @@ AbstractClient::AbstractClient()
connect(this, &AbstractClient::clientFinishUserMovedResized, this, &AbstractClient::moveResizedChanged);
connect(this, &AbstractClient::clientStartUserMovedResized, this, &AbstractClient::removeCheckScreenConnection);
connect(this, &AbstractClient::clientFinishUserMovedResized, this, &AbstractClient::setupCheckScreenConnection);
connect(this, &AbstractClient::paletteChanged, this, &AbstractClient::triggerDecorationRepaint);
}
AbstractClient::~AbstractClient()
@ -1320,4 +1322,11 @@ bool AbstractClient::decorationHasAlpha() const
return true;
}
void AbstractClient::triggerDecorationRepaint()
{
if (isDecorated()) {
decoration()->update();
}
}
}

@ -496,6 +496,7 @@ public:
return m_decoration != nullptr;
}
bool decorationHasAlpha() const;
void triggerDecorationRepaint();
// TODO: remove boolean trap
static bool belongToSameApplication(const AbstractClient* c1, const AbstractClient* c2, bool active_hack = false);

@ -154,8 +154,6 @@ Client::Client()
client_size = QSize(100, 100);
ready_for_painting = false; // wait for first damage or sync reply
connect(this, &Client::paletteChanged, this, &Client::triggerDecorationRepaint);
connect(clientMachine(), &ClientMachine::localhostChanged, this, &Client::updateCaption);
connect(options, &Options::condensedTitleChanged, this, &Client::updateCaption);
@ -440,13 +438,6 @@ void Client::destroyDecoration()
m_decoInputExtent.reset();
}
void Client::triggerDecorationRepaint()
{
if (isDecorated()) {
decoration()->update();
}
}
void Client::layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect &bottom) const
{
if (!isDecorated()) {

@ -231,7 +231,6 @@ public:
void takeFocus() override;
void updateDecoration(bool check_workspace_pos, bool force = false);
void triggerDecorationRepaint();
void updateShape();

Loading…
Cancel
Save