@@ -15,7 +15,7 @@
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18−import QtQuick 2.4
18+import QtQuick 2.8
19import QtQuick.Window 2.2
19import QtQuick.Window 2.2
20import AccountsService 0.1
20import AccountsService 0.1
21import Unity.Application 0.1
21import Unity.Application 0.1
@@ -71,6 +71,20 @@ StyledItem {
71 property bool hasTouchscreen: false
71 property bool hasTouchscreen: false
72 property bool supportsMultiColorLed: true
72 property bool supportsMultiColorLed: true
74+ // The largest dimension, in pixels, of all of the screens this Shell is
76+ // If a script sets the shell to 240x320 when it was 320x240, we could
77+ // end up in a situation where our dimensions are 240x240 for a short time.
78+ // Notifying the Wallpaper of both events would make it reload the image
79+ // twice. So, we use a Binding { delayed: true }.
80+ property real largestScreenDimension
84+ property: "largestScreenDimension"
85+ value: Math.max(nativeWidth, nativeHeight)
74 // Used by tests
88 // Used by tests
75 property alias lightIndicators: indicatorsModel.light
89 property alias lightIndicators: indicatorsModel.light
@@ -308,6 +322,7 @@ StyledItem {
309 dragAreaWidth: shell.edgeSize
323 dragAreaWidth: shell.edgeSize
310 background: wallpaperResolver.background
324 background: wallpaperResolver.background
325+ backgroundSourceSize: shell.largestScreenDimension
312 applicationManager: ApplicationManager
327 applicationManager: ApplicationManager
313 topLevelSurfaceList: topLevelSurfaceList
328 topLevelSurfaceList: topLevelSurfaceList
@@ -423,6 +438,7 @@ StyledItem {
423 tabletMode: shell.usageScenario != "phone"
438 tabletMode: shell.usageScenario != "phone"
424 forcedUnlock: wizard.active || shell.mode === "full-shell"
439 forcedUnlock: wizard.active || shell.mode === "full-shell"
425 background: wallpaperResolver.background
440 background: wallpaperResolver.background
441+ backgroundSourceSize: shell.largestScreenDimension
426 hasCustomBackground: wallpaperResolver.hasCustomBackground
442 hasCustomBackground: wallpaperResolver.hasCustomBackground
427 allowFingerprint: !dialogs.hasActiveDialog &&
443 allowFingerprint: !dialogs.hasActiveDialog &&
428 !notifications.topmostIsFullscreen &&
444 !notifications.topmostIsFullscreen &&
@@ -588,6 +604,7 @@ StyledItem {
588 drawerEnabled: !greeter.active && tutorial.launcherLongSwipeEnabled
604 drawerEnabled: !greeter.active && tutorial.launcherLongSwipeEnabled
589 privateMode: greeter.active
605 privateMode: greeter.active
590 background: wallpaperResolver.background
606 background: wallpaperResolver.background
607+ backgroundSourceSize: shell.largestScreenDimension
592 // It can be assumed that the Launcher and Panel would overlap if
609 // It can be assumed that the Launcher and Panel would overlap if
593 // the Panel is open and taking up the full width of the shell
610 // the Panel is open and taking up the full width of the shell