Changeset View
Changeset View
Standalone View
Standalone View
deleted.cpp
Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Line(s) | 88 | { | |||
---|---|---|---|---|---|
89 | delete_refcount = 0; | 89 | delete_refcount = 0; | ||
90 | delete this; | 90 | delete this; | ||
91 | } | 91 | } | ||
92 | 92 | | |||
93 | void Deleted::copyToDeleted(Toplevel* c) | 93 | void Deleted::copyToDeleted(Toplevel* c) | ||
94 | { | 94 | { | ||
95 | Q_ASSERT(dynamic_cast< Deleted* >(c) == nullptr); | 95 | Q_ASSERT(dynamic_cast< Deleted* >(c) == nullptr); | ||
96 | Toplevel::copyToDeleted(c); | 96 | Toplevel::copyToDeleted(c); | ||
97 | m_bufferScale = c->bufferScale(); | ||||
97 | desk = c->desktop(); | 98 | desk = c->desktop(); | ||
98 | m_desktops = c->desktops(); | 99 | m_desktops = c->desktops(); | ||
99 | activityList = c->activities(); | 100 | activityList = c->activities(); | ||
100 | contentsRect = QRect(c->clientPos(), c->clientSize()); | 101 | contentsRect = QRect(c->clientPos(), c->clientSize()); | ||
101 | m_contentPos = c->clientContentPos(); | 102 | m_contentPos = c->clientContentPos(); | ||
102 | transparent_rect = c->transparentRect(); | 103 | transparent_rect = c->transparentRect(); | ||
103 | m_layer = c->layer(); | 104 | m_layer = c->layer(); | ||
104 | m_frame = c->frameId(); | 105 | m_frame = c->frameId(); | ||
Show All 36 Lines | |||||
141 | 142 | | |||
142 | for (auto vd : m_desktops) { | 143 | for (auto vd : m_desktops) { | ||
143 | connect(vd, &QObject::destroyed, this, [=] { | 144 | connect(vd, &QObject::destroyed, this, [=] { | ||
144 | m_desktops.removeOne(vd); | 145 | m_desktops.removeOne(vd); | ||
145 | }); | 146 | }); | ||
146 | } | 147 | } | ||
147 | 148 | | |||
148 | m_wasWaylandClient = qobject_cast<ShellClient *>(c) != nullptr; | 149 | m_wasWaylandClient = qobject_cast<ShellClient *>(c) != nullptr; | ||
149 | m_wasX11Client = !m_wasWaylandClient; | 150 | m_wasX11Client = qobject_cast<Client *>(c) != nullptr; | ||
150 | m_wasPopupWindow = c->isPopupWindow(); | 151 | m_wasPopupWindow = c->isPopupWindow(); | ||
151 | m_wasOutline = c->isOutline(); | 152 | m_wasOutline = c->isOutline(); | ||
152 | } | 153 | } | ||
153 | 154 | | |||
154 | void Deleted::unrefWindow() | 155 | void Deleted::unrefWindow() | ||
155 | { | 156 | { | ||
156 | if (--delete_refcount > 0) | 157 | if (--delete_refcount > 0) | ||
157 | return; | 158 | return; | ||
158 | // needs to be delayed | 159 | // needs to be delayed | ||
159 | // a) when calling from effects, otherwise it'd be rather complicated to handle the case of the | 160 | // a) when calling from effects, otherwise it'd be rather complicated to handle the case of the | ||
160 | // window going away during a painting pass | 161 | // window going away during a painting pass | ||
161 | // b) to prevent dangeling pointers in the stacking order, see bug #317765 | 162 | // b) to prevent dangeling pointers in the stacking order, see bug #317765 | ||
162 | deleteLater(); | 163 | deleteLater(); | ||
163 | } | 164 | } | ||
164 | 165 | | |||
166 | qreal Deleted::bufferScale() const | ||||
167 | { | ||||
168 | return m_bufferScale; | ||||
169 | } | ||||
170 | | ||||
165 | int Deleted::desktop() const | 171 | int Deleted::desktop() const | ||
166 | { | 172 | { | ||
167 | return desk; | 173 | return desk; | ||
168 | } | 174 | } | ||
169 | 175 | | |||
170 | QStringList Deleted::activities() const | 176 | QStringList Deleted::activities() const | ||
171 | { | 177 | { | ||
172 | return activityList; | 178 | return activityList; | ||
▲ Show 20 Lines • Show All 126 Lines • Show Last 20 Lines |