Changeset View
Changeset View
Standalone View
Standalone View
workspace.cpp
Show All 16 Lines | |||||
17 | 17 | | |||
18 | You should have received a copy of the GNU General Public License | 18 | You should have received a copy of the GNU General Public License | ||
19 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
20 | *********************************************************************/ | 20 | *********************************************************************/ | ||
21 | // own | 21 | // own | ||
22 | #include "workspace.h" | 22 | #include "workspace.h" | ||
23 | // kwin libs | 23 | // kwin libs | ||
24 | #include <kwinglplatform.h> | 24 | #include <kwinglplatform.h> | ||
25 | #include <kwinxrenderutils.h> | | |||
26 | // kwin | 25 | // kwin | ||
27 | #ifdef KWIN_BUILD_ACTIVITIES | 26 | #ifdef KWIN_BUILD_ACTIVITIES | ||
28 | #include "activities.h" | 27 | #include "activities.h" | ||
29 | #endif | 28 | #endif | ||
30 | #include "appmenu.h" | 29 | #include "appmenu.h" | ||
31 | #include "atoms.h" | 30 | #include "atoms.h" | ||
32 | #include "client.h" | 31 | #include "client.h" | ||
33 | #include "composite.h" | 32 | #include "composite.h" | ||
▲ Show 20 Lines • Show All 144 Lines • ▼ Show 20 Line(s) | 147 | #endif | |||
178 | // actual initialization happens in init() | 177 | // actual initialization happens in init() | ||
179 | VirtualDesktopManager::create(this); | 178 | VirtualDesktopManager::create(this); | ||
180 | 179 | | |||
181 | #ifdef KWIN_BUILD_TABBOX | 180 | #ifdef KWIN_BUILD_TABBOX | ||
182 | // need to create the tabbox before compositing scene is setup | 181 | // need to create the tabbox before compositing scene is setup | ||
183 | TabBox::TabBox::create(this); | 182 | TabBox::TabBox::create(this); | ||
184 | #endif | 183 | #endif | ||
185 | 184 | | |||
186 | // init XRenderUtils | | |||
187 | if (kwinApp()->operationMode() == Application::OperationModeX11) { | | |||
188 | XRenderUtils::init(connection(), rootWindow()); | | |||
189 | } | | |||
190 | if (Compositor::self()) { | 185 | if (Compositor::self()) { | ||
191 | m_compositor = Compositor::self(); | 186 | m_compositor = Compositor::self(); | ||
192 | } else { | 187 | } else { | ||
193 | m_compositor = Compositor::create(this); | 188 | m_compositor = Compositor::create(this); | ||
194 | } | 189 | } | ||
195 | connect(this, &Workspace::currentDesktopChanged, m_compositor, &Compositor::addRepaintFull); | 190 | connect(this, &Workspace::currentDesktopChanged, m_compositor, &Compositor::addRepaintFull); | ||
196 | connect(m_compositor, &QObject::destroyed, this, [this] { m_compositor = nullptr; }); | 191 | connect(m_compositor, &QObject::destroyed, this, [this] { m_compositor = nullptr; }); | ||
197 | 192 | | |||
▲ Show 20 Lines • Show All 311 Lines • ▼ Show 20 Line(s) | 465 | { | |||
509 | delete startup; | 504 | delete startup; | ||
510 | delete Placement::self(); | 505 | delete Placement::self(); | ||
511 | delete client_keys_dialog; | 506 | delete client_keys_dialog; | ||
512 | foreach (SessionInfo * s, session) | 507 | foreach (SessionInfo * s, session) | ||
513 | delete s; | 508 | delete s; | ||
514 | 509 | | |||
515 | // TODO: ungrabXServer(); | 510 | // TODO: ungrabXServer(); | ||
516 | 511 | | |||
517 | if (kwinApp()->operationMode() == Application::OperationModeX11) { | | |||
518 | XRenderUtils::cleanup(); | | |||
519 | } | | |||
520 | Xcb::Extensions::destroy(); | 512 | Xcb::Extensions::destroy(); | ||
521 | _self = 0; | 513 | _self = 0; | ||
522 | } | 514 | } | ||
523 | 515 | | |||
524 | void Workspace::setupClientConnections(AbstractClient *c) | 516 | void Workspace::setupClientConnections(AbstractClient *c) | ||
525 | { | 517 | { | ||
526 | connect(c, &Toplevel::needsRepaint, m_compositor, &Compositor::scheduleRepaint); | 518 | connect(c, &Toplevel::needsRepaint, m_compositor, &Compositor::scheduleRepaint); | ||
527 | connect(c, &AbstractClient::desktopPresenceChanged, this, &Workspace::desktopPresenceChanged); | 519 | connect(c, &AbstractClient::desktopPresenceChanged, this, &Workspace::desktopPresenceChanged); | ||
▲ Show 20 Lines • Show All 1285 Lines • Show Last 20 Lines |