Changeset View
Changeset View
Standalone View
Standalone View
workspace.cpp
Show First 20 Lines • Show All 362 Lines • ▼ Show 20 Line(s) | 214 | { | |||
---|---|---|---|---|---|
363 | if (new_active_client != NULL) | 363 | if (new_active_client != NULL) | ||
364 | activateClient(new_active_client); | 364 | activateClient(new_active_client); | ||
365 | 365 | | |||
366 | Scripting::create(this); | 366 | Scripting::create(this); | ||
367 | 367 | | |||
368 | if (auto w = waylandServer()) { | 368 | if (auto w = waylandServer()) { | ||
369 | connect(w, &WaylandServer::shellClientAdded, this, | 369 | connect(w, &WaylandServer::shellClientAdded, this, | ||
370 | [this] (ShellClient *c) { | 370 | [this] (ShellClient *c) { | ||
371 | setupClientConnections(c); | ||||
371 | c->updateDecoration(false); | 372 | c->updateDecoration(false); | ||
372 | updateClientLayer(c); | 373 | updateClientLayer(c); | ||
373 | if (!c->isInternal()) { | 374 | if (!c->isInternal()) { | ||
374 | QRect area = clientArea(PlacementArea, Screens::self()->current(), c->desktop()); | 375 | QRect area = clientArea(PlacementArea, Screens::self()->current(), c->desktop()); | ||
375 | bool placementDone = false; | 376 | bool placementDone = false; | ||
376 | if (c->isInitialPositionSet()) { | 377 | if (c->isInitialPositionSet()) { | ||
377 | placementDone = true; | 378 | placementDone = true; | ||
378 | } | 379 | } | ||
▲ Show 20 Lines • Show All 99 Lines • ▼ Show 20 Line(s) | 438 | { | |||
478 | 479 | | |||
479 | if (kwinApp()->operationMode() == Application::OperationModeX11) { | 480 | if (kwinApp()->operationMode() == Application::OperationModeX11) { | ||
480 | XRenderUtils::cleanup(); | 481 | XRenderUtils::cleanup(); | ||
481 | } | 482 | } | ||
482 | Xcb::Extensions::destroy(); | 483 | Xcb::Extensions::destroy(); | ||
483 | _self = 0; | 484 | _self = 0; | ||
484 | } | 485 | } | ||
485 | 486 | | |||
487 | void Workspace::setupClientConnections(AbstractClient *c) | ||||
488 | { | ||||
489 | connect(c, &Toplevel::needsRepaint, m_compositor, &Compositor::scheduleRepaint); | ||||
490 | connect(c, &AbstractClient::desktopPresenceChanged, this, &Workspace::desktopPresenceChanged); | ||||
491 | } | ||||
492 | | ||||
486 | Client* Workspace::createClient(xcb_window_t w, bool is_mapped) | 493 | Client* Workspace::createClient(xcb_window_t w, bool is_mapped) | ||
487 | { | 494 | { | ||
488 | StackingUpdatesBlocker blocker(this); | 495 | StackingUpdatesBlocker blocker(this); | ||
489 | Client* c = new Client(); | 496 | Client* c = new Client(); | ||
490 | connect(c, SIGNAL(needsRepaint()), m_compositor, SLOT(scheduleRepaint())); | 497 | setupClientConnections(c); | ||
491 | connect(c, &Client::activeChanged, m_compositor, static_cast<void (Compositor::*)()>(&Compositor::checkUnredirect)); | 498 | connect(c, &Client::activeChanged, m_compositor, static_cast<void (Compositor::*)()>(&Compositor::checkUnredirect)); | ||
492 | connect(c, SIGNAL(fullScreenChanged()), m_compositor, SLOT(checkUnredirect())); | 499 | connect(c, SIGNAL(fullScreenChanged()), m_compositor, SLOT(checkUnredirect())); | ||
493 | connect(c, SIGNAL(geometryChanged()), m_compositor, SLOT(checkUnredirect())); | 500 | connect(c, SIGNAL(geometryChanged()), m_compositor, SLOT(checkUnredirect())); | ||
494 | connect(c, SIGNAL(geometryShapeChanged(KWin::Toplevel*,QRect)), m_compositor, SLOT(checkUnredirect())); | 501 | connect(c, SIGNAL(geometryShapeChanged(KWin::Toplevel*,QRect)), m_compositor, SLOT(checkUnredirect())); | ||
495 | connect(c, SIGNAL(blockingCompositingChanged(KWin::Client*)), m_compositor, SLOT(updateCompositeBlocking(KWin::Client*))); | 502 | connect(c, SIGNAL(blockingCompositingChanged(KWin::Client*)), m_compositor, SLOT(updateCompositeBlocking(KWin::Client*))); | ||
496 | connect(c, SIGNAL(clientFullScreenSet(KWin::Client*,bool,bool)), ScreenEdges::self(), SIGNAL(checkBlocking())); | 503 | connect(c, SIGNAL(clientFullScreenSet(KWin::Client*,bool,bool)), ScreenEdges::self(), SIGNAL(checkBlocking())); | ||
497 | connect(c, &Client::desktopPresenceChanged, this, &Workspace::desktopPresenceChanged); | | |||
498 | if (!c->manage(w, is_mapped)) { | 504 | if (!c->manage(w, is_mapped)) { | ||
499 | Client::deleteClient(c); | 505 | Client::deleteClient(c); | ||
500 | return NULL; | 506 | return NULL; | ||
501 | } | 507 | } | ||
502 | addClient(c); | 508 | addClient(c); | ||
503 | return c; | 509 | return c; | ||
504 | } | 510 | } | ||
505 | 511 | | |||
▲ Show 20 Lines • Show All 1219 Lines • Show Last 20 Lines |