Changeset View
Changeset View
Standalone View
Standalone View
shell/shellcorona.cpp
Show First 20 Lines • Show All 1305 Lines • ▼ Show 20 Line(s) | 1305 | if (!m_closingDown) { | |||
---|---|---|---|---|---|
1306 | emit availableScreenRectChanged(); | 1306 | emit availableScreenRectChanged(); | ||
1307 | } | 1307 | } | ||
1308 | } | 1308 | } | ||
1309 | 1309 | | |||
1310 | void ShellCorona::handleContainmentAdded(Plasma::Containment *c) | 1310 | void ShellCorona::handleContainmentAdded(Plasma::Containment *c) | ||
1311 | { | 1311 | { | ||
1312 | connect(c, &Plasma::Containment::showAddWidgetsInterface, | 1312 | connect(c, &Plasma::Containment::showAddWidgetsInterface, | ||
1313 | this, &ShellCorona::toggleWidgetExplorer); | 1313 | this, &ShellCorona::toggleWidgetExplorer); | ||
1314 | // Why queued? this is usually triggered after a context menu closes | | |||
1315 | // due to its sync,modal nature it may eat some mouse event from the scene | | |||
1316 | // waiting a bit to create a new window, the dialog seems to reliably | | |||
1317 | // avoid the eating of one click in the panel after the context menu is gone | | |||
1318 | connect(c, &Plasma::Containment::appletAlternativesRequested, | 1314 | connect(c, &Plasma::Containment::appletAlternativesRequested, | ||
1319 | this, &ShellCorona::showAlternativesForApplet, Qt::QueuedConnection); | 1315 | this, &ShellCorona::showAlternativesForApplet); | ||
1320 | | ||||
1321 | connect(c, &Plasma::Containment::appletCreated, this, [this, c] (Plasma::Applet *applet) { | 1316 | connect(c, &Plasma::Containment::appletCreated, this, [this, c] (Plasma::Applet *applet) { | ||
1322 | executeSetupPlasmoidScript(c, applet); | 1317 | executeSetupPlasmoidScript(c, applet); | ||
1323 | }); | 1318 | }); | ||
1324 | } | 1319 | } | ||
1325 | 1320 | | |||
1326 | void ShellCorona::executeSetupPlasmoidScript(Plasma::Containment *containment, Plasma::Applet *applet) | 1321 | void ShellCorona::executeSetupPlasmoidScript(Plasma::Containment *containment, Plasma::Applet *applet) | ||
1327 | { | 1322 | { | ||
1328 | if (!applet->pluginMetaData().isValid() || !containment->pluginMetaData().isValid()) { | 1323 | if (!applet->pluginMetaData().isValid() || !containment->pluginMetaData().isValid()) { | ||
▲ Show 20 Lines • Show All 816 Lines • Show Last 20 Lines |