Discussion:
D15506: [StatusBarSpaceInfo] Only update when window is active
Kai Uwe Broulik
2018-09-14 13:41:53 UTC
Permalink
broulik created this revision.
broulik added reviewers: Dolphin, elvisangelaccio, sitter.
Herald added a project: Dolphin.
Herald added a subscriber: kfm-devel.
broulik requested review of this revision.

REVISION SUMMARY
Avoids needlessly waking up the disk or network when the window isn't active.

CCBUG: 398612

TEST PLAN
Verified that it updates once it gets focus
Verified the timer stops when window doesn't have focus

Has the side-effect that when you have multiple windows visible at the same time (e.g. two windows next to each other) that only the active one will update its free space info live

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D15506

AFFECTED FILES
src/statusbar/statusbarspaceinfo.cpp
src/statusbar/statusbarspaceinfo.h

To: broulik, #dolphin, elvisangelaccio, sitter
Cc: kfm-devel, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp
Kai Uwe Broulik
2018-09-14 13:43:18 UTC
Permalink
broulik edited the test plan for this revision.

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D15506

To: broulik, #dolphin, elvisangelaccio, sitter
Cc: kfm-devel, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp
Kai Uwe Broulik
2018-09-14 14:04:31 UTC
Permalink
broulik retitled this revision from "[StatusBarSpaceInfo] Only update when window is active" to "RFC: [StatusBarSpaceInfo] Only update when window is active".
broulik edited the test plan for this revision.

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D15506

To: broulik, #dolphin, elvisangelaccio, sitter
Cc: kfm-devel, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp
Kai Uwe Broulik
2018-09-14 14:36:58 UTC
Permalink
broulik edited the test plan for this revision.

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D15506

To: broulik, #dolphin, elvisangelaccio, sitter
Cc: kfm-devel, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp
Elvis Angelaccio
2018-09-15 10:56:04 UTC
Permalink
elvisangelaccio added a comment.


+1 for D15507 <https://phabricator.kde.org/D15507> and D15508 <https://phabricator.kde.org/D15508>

I'm not sure about this one. Even if the window is inactive, it could be still "visible" to the user's eyes. Why should it show stale information then?

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D15506

To: broulik, #dolphin, elvisangelaccio, sitter
Cc: kfm-devel, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp
Harald Sitter
2018-09-17 12:50:31 UTC
Permalink
sitter added a comment.


https://doc.qt.io/qt-5/qwidget.html#visibleRegion would be more reliable and also work for not visible tabs I think.

That said, I am not sure how that behaves for semi-transparent windows, so Elvis' point probably stands. A conservative approach might be to only stop polling when minimized? Then the window is definitely not visible.

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D15506

To: broulik, #dolphin, elvisangelaccio, sitter
Cc: kfm-devel, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp
Kai Uwe Broulik
2018-09-18 08:37:00 UTC
Permalink
broulik added a comment.
Post by Harald Sitter
https://doc.qt.io/qt-5/qwidget.html#visibleRegion would be more reliable and also work for not visible tabs I think.
Good idea, will try. It won't help with "obscured" windows, though, but yeah, the minimize state is probably definitely something to take into account (though I hardly ever minimize windows, they're just buried under 20 layers of windows here :D)

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D15506

To: broulik, #dolphin, elvisangelaccio, sitter
Cc: kfm-devel, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp
Loading...