Bug 283309 - Attaching windows to activities is too clumsy
Summary: Attaching windows to activities is too clumsy
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: activities (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: 4.10.2
Assignee: KWin default assignee
URL:
Keywords:
: 303982 308486 311862 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-04 11:09 UTC by artem
Modified: 2013-03-25 07:54 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.10.2
thomas.luebking: ReviewRequest+


Attachments
Menu demo (3.27 KB, text/html)
2012-05-31 13:48 UTC, artem
Details
Menu demo with autohiding (8.04 KB, text/html)
2012-05-31 15:58 UTC, artem
Details

Note You need to log in before you can comment on or make changes to this bug.
Description artem 2011-10-04 11:09:22 UTC
Version:           unspecified (using KDE 4.6.5) 
OS:                Linux

When I move a window from the current activity to another one via the window menu, it switches to displaying the window in allactivities. When I select activity secondly, it works right. But it's really annoying to select activity twice every time you want to move a window between the activities.

Reproducible: Always

Steps to Reproduce:
1. Create second activity.
2. Open any application.
3. Click on the window icon (left top corner), expand the activity submenu and make sure it is assotiated with the current activity only. If not, select it and repet step 3.
4. Now imagine you want to move the window to another activity.
5. Click on the window icon and select another activity.

Actual Results:  
The window is still in the current activity. If you check the window menu again, you will see "all activities" is the current selection.

Expected Results:  
The window should disappear and apppear in the selected activity, and the current selection should be the selected activity only, exactly like it works for desktops. The window should be displayed in all activities when I select "all activities" only.

And I think the checkboxes in the activity submenu and in the desktop submenu should be replaced with radiobars, like in the opacity submenu. Because the desktop submenu works like radiobars, not checkboxes. And the activity submenu should work the same way. Right now it's not clear how it works when I see checkboxes that behave like radiobars.
Comment 1 artem 2011-10-04 11:31:04 UTC
About checkboxes vs radiobuttons.

Actually, checkboxes make sense when you have more then two activities. You can wish to show some window in two activities but not in third one. But anyway there should be easy way to MOVE window between activities in one click, like it is possible with desktops. And ofcourse both activities and desktops submenu should work the same way while they looks similar.

If you want to provide such ability, one solution is to replace the "all activities" menu item with "multiple activities". If "multiple activities" is unchecked, selecting another activity moves the window and unchecks the current activity. If you select "multiple activities", it selects all activities automatically, all checkboxes became checked, so it works like extended "all activities" checkbox, and you don't have to click on each other activity to select all activities. But if you want to define some more complex rule, you have to uncheck the annecessary activities. If you unchecked all activities but one, the "multiple activities" became unchecked automatically, again, to awoid too many clicks. If you uncheck "multiple activities", it unchecks all activities automatically except of first selected (or even last time selected).

Another good thing is to keep the submenu opened after clicking on the menu item in case the "multiple activities" item is selected, but hide when focus is lost. So you don't have to open it again and again if you want to select/unselect few activities. Otherwise, if "multiple activities" is uchecked then the menu should be hidden right after selecting activity, like it works right now.
Comment 2 Vincent de Phily 2012-05-31 11:28:00 UTC
Try as I might, I don't understand artem's second paragraph, so I'm affraid it'll be complex to use too.

I suggest instead (similar to artem's third paragraph) to have radio buttons in the menu : one for each activity (which will handle the common "move to another single activity" action), and one labeled "multiple activities" which opens a child window that stays open untill dismissed and has a checkbox for each activity instead of radiobuttons.
Comment 3 artem 2012-05-31 13:48:13 UTC
Created attachment 71469 [details]
Menu demo

I wrote this javascript demo to show what I mean.
Comment 4 artem 2012-05-31 13:51:39 UTC
> I suggest instead (similar to artem's third paragraph) to have radio buttons in the menu

This would be nice too. The problem is that it's not flexible anough, like it is now. If you have three activities and want to see a window on first and second activity only, there is no choice. You can select all or one activity only. For example, I have two programming activies and one "home" activity. I want the timetracker to be visible on all programming acitivities, but it is not needed on "home".

Sorry for very confusing explanation. To make things clean, I'll try to explain my proposition with few mockups. This may seem hard to understand when read my text. Especially if we take into account my bad English :) But it seems pretty simple in visual implementation. You can try my javascript demo (attached above) to see what I mean. I suggest anybody to try it before he continue reading my explanation. Below is the implementation details, but the attached demo explains whole idea much better.

The activity menu may look like this:

[ ] Multiple activities
----------------------------
[X] First activity
[ ] Second activity
[ ] Third activity

By default, the activity checkboxes should work like radiobuttons, just like in desktop menu. This provides easy way to move the windows between activities. If you click on another activity, this unchecks the current one. In perfect case there should be radiobuttons instead of checkboxes for all items but not first. But this is not required, just to make things more clear for users.

[ ] Multiple activities
----------------------------
(X) First activity
( ) Second activity
( ) Third activity

So, all works as usually, unless the user clicked on "Multiple activities". This replaces radiobuttons with checkboxes (or changes behaviour if it's too hard to change the inputs). So now the user may check multiple activities. But he is not required to choice all acitivities. Instead he can select any set of activities that he want.

[X] Multiple activities
----------------------------
[ ] First activity
[X] Second activity
[X] Third activity

We solved problem of easy moving between activities, and got a problem of easy selecting all acitivities now. You have to click on each checkbox to select all. That's not user-friendly. To fix this, I'd assume that in most cases the user wants one or all activities. So, if he clicks "Multiple activities" then let's help him and select all activities automatically. He can uncheck the unwanted activities then if there are any.
Comment 5 Thomas Lübking 2012-05-31 15:02:19 UTC
any opinions about preventing the popup from autoclosing when checking an item?
Comment 6 artem 2012-05-31 15:58:39 UTC
Created attachment 71476 [details]
Menu demo with autohiding

I've added few variants to the demo which show various autohiding methods.
Comment 7 artem 2012-05-31 16:02:54 UTC
(In reply to comment #5)
> any opinions about preventing the popup from autoclosing when checking an
> item?

IMHO, most adequate variants are "Closing on radio" and "Always closing". And I'm not sure what is better. Another variants seem a bit confusing (see the updated demo)
Comment 8 artem 2012-05-31 16:11:05 UTC
One more note to my proposition. When uncheck "Multiple activities", the current one should be selected to prevent window from playing hide-and-seek. My demo does not reflect this because there is no current acitivity. Maybe I'll implement activities on the next update ))
Comment 9 artem 2012-06-01 12:34:54 UTC
(In reply to comment #5)
> any opinions about preventing the popup from autoclosing when checking an
> item?

Also, what about holding shift or ctrl to prevent autoclosing? This may be easy to use. But I don't know how to hint the user at this feature.
Comment 10 Vincent de Phily 2012-06-01 16:40:18 UTC
I think "closing on radio" is the one we want here, otherwise we get back to the usability problem we started with (having to reopen the menu multiple times).

If it can be implemented like this, I'm happy.
But I'm afraid that we'll have technical problems trying to alter the behaviour of the Qt menu to stay open, or to change its content from radiobuttons to checkboxes without closing it first. Don't want to have some ugly hacks to make it work on all platforms.

This is why I was sugesting a menu with all radio buttons:
(*) Multiple activities
( ) First activity
( ) Second activity
( ) Third activity
but when "Multiple activities" is clicked, a new window (not a menu) opens and allows you to choose any combination via checkboxes.

It's not as elegant UI-wise, but it may be a safer choice Bug-wise.
Comment 11 artem 2012-06-01 16:55:58 UTC
(In reply to comment #10)
> I think "closing on radio" is the one we want here, otherwise we get back to
> the usability problem we started with (having to reopen the menu multiple
> times).


> But I'm afraid that we'll have technical problems trying to alter the
> behaviour of the Qt menu to stay open,

This is the only real problem that I'd check if it is really exists or not.

> or to change its content from
> radiobuttons to checkboxes without closing it first.

This problem may be avoided by using checkboxes instead radiobuttons, just changing behaviour.

> This is why I was sugesting a menu with all radio buttons:
> (*) Multiple activities
> ( ) First activity
> ( ) Second activity
> ( ) Third activity
> but when "Multiple activities" is clicked, a new window (not a menu) opens
> and allows you to choose any combination via checkboxes.

If it appears impossible to keep the menu opened, maybe it makes sense to replace the whole submenu with a new window? It should not be a problem to implement any logic this way.
Comment 12 Vincent de Phily 2012-06-02 17:18:39 UTC
I think we agree on the desired behaviour (the "close on radio" one for you demo being the best one). It'now up to a developer to see if some compromise needs to be made.
Comment 13 Thomas Lübking 2012-12-15 16:50:15 UTC
*** Bug 303982 has been marked as a duplicate of this bug. ***
Comment 14 Thomas Lübking 2012-12-15 16:50:26 UTC
*** Bug 308486 has been marked as a duplicate of this bug. ***
Comment 15 Thomas Lübking 2012-12-15 16:52:40 UTC
Also see bug #305758 (MW action proposal)
Comment 16 Thomas Lübking 2012-12-30 22:37:06 UTC
https://git.reviewboard.kde.org/r/107762/
Comment 17 Thomas Lübking 2013-01-21 20:45:47 UTC
*** Bug 311862 has been marked as a duplicate of this bug. ***
Comment 18 Thomas Lübking 2013-03-24 21:54:44 UTC
Git commit b0c1a197d30f42fc405586aff18cd21ea3e46037 by Thomas Lübking.
Committed on 24/03/2013 at 21:57.
Pushed by luebking into branch 'KDE/4.10'.

use QWidgetAction for activity setting in alt+f3

not that i really like using QWidgetAction, but it'll
prevent the popup from autoclosing.
Introduce activityUpdateBlocking to prevent users from
removing the popup under their fingertips
FIXED-IN: 4.10.2
REVIEW: 107762

M  +19   -4    kwin/client.cpp
M  +3    -0    kwin/client.h
M  +24   -5    kwin/useractions.cpp

http://commits.kde.org/kde-workspace/b0c1a197d30f42fc405586aff18cd21ea3e46037