Added indicator of whether there are windows in an activity to the switcher
ClosedPublic

Authored by ivan on Feb 22 2016, 7:23 PM.

Details

Summary
  • The model gained two new roles - WindowCount and HasWindows
  • The switcher new shows a small icon above the last used string if there are windows in the corresponding activity

It was decided some time ago that the window rectangles (as seen in the
activity pager) are not fitting for the activity switcher, but
nevertheless, the information that some activity has windows in it is
important.

Windows that are on all activities are ignored.

Diff Detail

Repository
R119 Plasma Desktop
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
ivan updated this revision to Diff 2433.Feb 22 2016, 7:23 PM
ivan retitled this revision from to Added indicator of whether there are windows in an activity to the switcher.
ivan updated this object.
ivan edited the test plan for this revision. (Show Details)
ivan added reviewers: mart, davidedmundson, graesslin, sebas.
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 22 2016, 7:23 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ivan updated this object.Feb 22 2016, 7:25 PM
ivan updated this object.Feb 22 2016, 7:31 PM
mart accepted this revision.Feb 22 2016, 8:06 PM
mart edited edge metadata.

it will take a lot of thinking on the wayland side ;) but yes, i like it

This revision is now accepted and ready to land.Feb 22 2016, 8:06 PM
davidedmundson accepted this revision.Feb 22 2016, 8:29 PM
davidedmundson edited edge metadata.

+1 too

imports/activitymanager/sortedactivitiesmodel.h
106 ↗(On Diff #2433)

worth #ifdef'ing this.

as that way future users will get an error if they try and use it rather than an uninitialised var.

broulik added inline comments.
imports/activitymanager/sortedactivitiesmodel.h
25 ↗(On Diff #2433)

I think QWindow also defines this

106 ↗(On Diff #2433)

Or just bool m_isOnX11 = false; and the constructor takes care of it if we have X11

ivan marked an inline comment as done.Feb 22 2016, 8:45 PM
ivan added inline comments.
imports/activitymanager/sortedactivitiesmodel.h
25 ↗(On Diff #2433)

I've used the same thing mgraesling used in kwinsys.

106 ↗(On Diff #2433)

Went for David's idea - one bool less to save :)

ivan updated this revision to Diff 2434.Feb 22 2016, 8:46 PM
ivan edited edge metadata.

Small fixes

This revision was automatically updated to reflect the committed changes.
graesslin edited edge metadata.Feb 23 2016, 6:42 AM

I think all your ifdefs are not needeed. Neither are the x11 runtime checks.

imports/activitymanager/sortedactivitiesmodel.cpp
195–217 ↗(On Diff #2433)

I don't understand why you made this conditional. It should also work on Wayland.

imports/activitymanager/sortedactivitiesmodel.h
25 ↗(On Diff #2433)

Note: the code in kwindowsystem goes back to KDE 3 time and is clearly not written by me.

36–43 ↗(On Diff #2433)

NET Properties are not X11 specific. They are available on all platforms.