Bug 352001 - KScreen::Screen::apply does not update currentSize
Summary: KScreen::Screen::apply does not update currentSize
Status: RESOLVED FIXED
Alias: None
Product: KScreen
Classification: Plasma
Component: libkscreen (show other bugs)
Version: 5.4.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Daniel Vrátil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-30 00:38 UTC by Andrew Chen
Modified: 2015-08-30 20:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.4.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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