Mark Toplevel as not ready for painting by default

Summary:
Get rid of some duplication as InternalClient, XdgShellClient, Unmanaged,
and Client initialize ready_for_painting to false.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24189
This commit is contained in:
Vlad Zahorodnii 2019-09-15 17:59:40 +03:00
parent f67db3a918
commit 64feafc10f
5 changed files with 1 additions and 7 deletions

View file

@ -159,7 +159,6 @@ Client::Client()
geom = QRect(0, 0, 100, 100); // So that decorations don't start with size being (0,0)
client_size = QSize(100, 100);
ready_for_painting = false; // wait for first damage or sync reply
connect(clientMachine(), &ClientMachine::localhostChanged, this, &Client::updateCaption);
connect(options, &Options::condensedTitleChanged, this, &Client::updateCaption);

View file

@ -41,9 +41,6 @@ InternalClient::InternalClient(QWindow *window)
, m_windowId(window->winId())
, m_internalWindowFlags(window->flags())
{
// Don't render the client until it provides a buffer.
ready_for_painting = false;
connect(m_internalWindow, &QWindow::xChanged, this, &InternalClient::updateInternalWindowGeometry);
connect(m_internalWindow, &QWindow::yChanged, this, &InternalClient::updateInternalWindowGeometry);
connect(m_internalWindow, &QWindow::widthChanged, this, &InternalClient::updateInternalWindowGeometry);

View file

@ -43,7 +43,7 @@ Toplevel::Toplevel()
: m_visual(XCB_NONE)
, bit_depth(24)
, info(nullptr)
, ready_for_painting(true)
, ready_for_painting(false)
, m_isDamaged(false)
, m_internalId(QUuid::createUuid())
, m_client()

View file

@ -45,7 +45,6 @@ const NET::WindowTypes SUPPORTED_UNMANAGED_WINDOW_TYPES_MASK = NET::NormalMask |
Unmanaged::Unmanaged()
: Toplevel()
{
ready_for_painting = false;
connect(this, SIGNAL(geometryShapeChanged(KWin::Toplevel*,QRect)), SIGNAL(geometryChanged()));
QTimer::singleShot(50, this, SLOT(setReadyForPainting()));
}

View file

@ -196,7 +196,6 @@ void XdgShellClient::init()
updateIcon();
SurfaceInterface *s = surface();
Q_ASSERT(s);
ready_for_painting = false;
doSetGeometry(QRect(QPoint(0, 0), m_clientSize));
if (waylandServer()->inputMethodConnection() == s->client()) {
m_windowType = NET::OnScreenDisplay;