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