Commit 64feafc1 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

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
parent f67db3a9
...@@ -159,7 +159,6 @@ Client::Client() ...@@ -159,7 +159,6 @@ Client::Client()
geom = QRect(0, 0, 100, 100); // So that decorations don't start with size being (0,0) geom = QRect(0, 0, 100, 100); // So that decorations don't start with size being (0,0)
client_size = QSize(100, 100); client_size = QSize(100, 100);
ready_for_painting = false; // wait for first damage or sync reply
connect(clientMachine(), &ClientMachine::localhostChanged, this, &Client::updateCaption); connect(clientMachine(), &ClientMachine::localhostChanged, this, &Client::updateCaption);
connect(options, &Options::condensedTitleChanged, this, &Client::updateCaption); connect(options, &Options::condensedTitleChanged, this, &Client::updateCaption);
......
...@@ -41,9 +41,6 @@ InternalClient::InternalClient(QWindow *window) ...@@ -41,9 +41,6 @@ InternalClient::InternalClient(QWindow *window)
, m_windowId(window->winId()) , m_windowId(window->winId())
, m_internalWindowFlags(window->flags()) , 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::xChanged, this, &InternalClient::updateInternalWindowGeometry);
connect(m_internalWindow, &QWindow::yChanged, this, &InternalClient::updateInternalWindowGeometry); connect(m_internalWindow, &QWindow::yChanged, this, &InternalClient::updateInternalWindowGeometry);
connect(m_internalWindow, &QWindow::widthChanged, this, &InternalClient::updateInternalWindowGeometry); connect(m_internalWindow, &QWindow::widthChanged, this, &InternalClient::updateInternalWindowGeometry);
......
...@@ -43,7 +43,7 @@ Toplevel::Toplevel() ...@@ -43,7 +43,7 @@ Toplevel::Toplevel()
: m_visual(XCB_NONE) : m_visual(XCB_NONE)
, bit_depth(24) , bit_depth(24)
, info(nullptr) , info(nullptr)
, ready_for_painting(true) , ready_for_painting(false)
, m_isDamaged(false) , m_isDamaged(false)
, m_internalId(QUuid::createUuid()) , m_internalId(QUuid::createUuid())
, m_client() , m_client()
......
...@@ -45,7 +45,6 @@ const NET::WindowTypes SUPPORTED_UNMANAGED_WINDOW_TYPES_MASK = NET::NormalMask | ...@@ -45,7 +45,6 @@ const NET::WindowTypes SUPPORTED_UNMANAGED_WINDOW_TYPES_MASK = NET::NormalMask |
Unmanaged::Unmanaged() Unmanaged::Unmanaged()
: Toplevel() : Toplevel()
{ {
ready_for_painting = false;
connect(this, SIGNAL(geometryShapeChanged(KWin::Toplevel*,QRect)), SIGNAL(geometryChanged())); connect(this, SIGNAL(geometryShapeChanged(KWin::Toplevel*,QRect)), SIGNAL(geometryChanged()));
QTimer::singleShot(50, this, SLOT(setReadyForPainting())); QTimer::singleShot(50, this, SLOT(setReadyForPainting()));
} }
......
...@@ -196,7 +196,6 @@ void XdgShellClient::init() ...@@ -196,7 +196,6 @@ void XdgShellClient::init()
updateIcon(); updateIcon();
SurfaceInterface *s = surface(); SurfaceInterface *s = surface();
Q_ASSERT(s); Q_ASSERT(s);
ready_for_painting = false;
doSetGeometry(QRect(QPoint(0, 0), m_clientSize)); doSetGeometry(QRect(QPoint(0, 0), m_clientSize));
if (waylandServer()->inputMethodConnection() == s->client()) { if (waylandServer()->inputMethodConnection() == s->client()) {
m_windowType = NET::OnScreenDisplay; m_windowType = NET::OnScreenDisplay;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment