Bug 352001

Summary: KScreen::Screen::apply does not update currentSize
Product: [Plasma] KScreen Reporter: Andrew Chen <andrew>
Component: libkscreenAssignee: Daniel Vrátil <dvratil>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 5.4.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 5.4.1
Sentry Crash Report:

Description Andrew Chen 2015-08-30 00:38:26 UTC
currentSize can be changed due to addition, removal, or change of resolution of outputs, therefore it should be updated in Screen::apply.
Correctly updating currentSize will allow plasmashell to be notified of a change in screen size.

Reproducible: Always




Fix:

diff --git a/src/screen.cpp b/src/screen.cpp
index 6d1c5d8..7800dd1 100644
--- a/src/screen.cpp
+++ b/src/screen.cpp
@@ -129,4 +129,5 @@ void Screen::apply(const ScreenPtr &other)
 {
     // Only set values that can change
     setMaxActiveOutputsCount(other->d->maxActiveOutputsCount);
+    setCurrentSize(other->d->currentSize);
 }
Comment 1 Andrew Chen 2015-08-30 06:10:17 UTC
Sorry for the noise. I'm new to kde. I just realized that I should be submit a review request instead.
https://git.reviewboard.kde.org/r/124992/
Comment 2 Daniel Vrátil 2015-08-30 20:46:52 UTC
commit 210a7a1f5a5748e60c431a5716f0de46a2b49d48
Author: Andrew Chen <andrew.chuanye.chen@gmail.com>
Date:   Sun Aug 30 22:45:31 2015 +0200

    Update currentSize in Screen::apply
    
    REVIEW: 124992