File: consider-an-empty-panel-always-applets-loaded.patch

package info (click to toggle)
plasma-framework 5.28.0-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 11,168 kB
  • ctags: 3,945
  • sloc: cpp: 28,840; sh: 534; python: 477; ruby: 117; xml: 110; php: 27; makefile: 5
file content (28 lines) | stat: -rw-r--r-- 1,030 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From: Marco Martin <notmart@gmail.com>
Date: Wed, 21 Dec 2016 18:10:04 +0100
Subject: consider an empty panel always "applets loaded"

if a panel doesn't ahve applets, it can't have a "currently
loading" as the status of its applets.
this fixes panels sometimes not showing up when reconnecting screens

CCBUG:373836
---
 src/plasma/containment.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/plasma/containment.cpp b/src/plasma/containment.cpp
index 133220a6a..b9c8c8b56 100644
--- a/src/plasma/containment.cpp
+++ b/src/plasma/containment.cpp
@@ -297,6 +297,10 @@ void Containment::restoreContents(KConfigGroup &group)
         d->createApplet(plugin, QVariantList(), appId);
     }
 
+    //if there are no applets, none of them is "loading"
+    if (Containment::applets().isEmpty()) {
+        d->appletsUiReady = true;
+    }
     foreach (Applet *applet, Containment::applets()) {
         if (!applet->pluginMetaData().isValid()) {
             applet->updateConstraints(Plasma::Types::UiReadyConstraint);