Cube and pager

As it is quite obvious the cube effect cannot use the desktop layout defined by the pager. For cube the layout has to be

| 1 | 2 | 3 | 4 |

That’s basically how the user would expect the cube to work. All virtual desktops are mapped to the faces of a geometric object. That’s how we know it from Compiz. But this layout used by cube does not represent the actual layout which is in case of 4 desktops like that

| 1 | 2 |
| 3 | 4 |

In my opinion it is impossible to use this layout for cube. Of course you could do something like having just two faces and scaling the desktops so that (1,3) is on one face and (2,4) is on the other face. But that makes the cube effect kind of useless. It would require to have at least eight desktops in a 2×4 layout. But I don’t expect that someone using 8 desktops will ever use cube. I personally think cube effect is more for the normal user, but not for the power user. And I’d say having 8 desktops is kind of power using 😉

So cube effect has to ignore the desktop layout which is OK and even allowed by EWMH.

But when using cube to animate change of desktop via pager, via ctrl+f1-4 or via active desktop borders it should use the desktop layout. E.g. when you use the pager to switch from desktop 1 to 3 in the above shown layout you’d expect the animation to go down and not twice to the right. You’d expect the same behaviour as in slide animation.

For using pager and ctrl+f1-4 it’s still usable as it’s, but when you use active desktop borders and drag a window to another desktop it becomes painful. E.g. you drag a window from desktop 1 to the left. Thinking of the cube you will end up in desktop 4, but in fact you end in desktop 2. You move your window to the left, but receive an animation to the right. Even worse when you move a window to the top or down. Instead of having an animation going downwards or upwards you animate twice to the left or right. The animation does not reflect at all what triggered the animation. That’s probably one of the reasons why I myself do not use cube effect to animate the desktop change 😉

So you might have guessed it: I worked on improving this situation and there is a new solution to the problem available in my git branch. It will need some more work before it can be merged to trunk (there are more improvements than this one). While animating the desktop change cube follows the pager layout. That is changing from desktop 1 to 3 will result in an animation downwards, changing from 1 to 4 will result in an animation to the right and one downwards. Here’s a screenshot of what it looks like:

The screenshot illustrates another new requested feature: you can keep the panels in place while the cube rotates. I like it very much and I think it will change from currently opt-in to an opt-out 😉 Of course this feature is not available in ctrl+f11 mode.

Btw currently it is the best time to request features for cube. At the moment I have no lectures and no upcoming exams. So I have lots of time and I am working on cube. So I’m waiting for your feature requests at 😉

19 Replies to “Cube and pager”

  1. First, congrats to the 4.2 release and your work on kwin, it’s awesome!

    But I have some doubts if this is the right solution.
    Rotating a real cube to the right and then up or downwards results in the same face as if you rotate it directly up or downwards.
    So this new feature breaks the old warm and nice “Now I can imagine my multiple desktops and I know where I am”-feeling.

    There should be at least an option to revert to the old behaviour.

  2. @Robin: good point. I’ll think about it. But of course if you layout the desktops in the pager like they would be in cube you would have the “correct” behaviour and it’s just an animation 😉

  3. Hi Martin! Nice work with the panels, can you extend that to keep all sticky windows where they are on the screen? It feels wrong to me to see the same window on all sides of the cube and for a sticky window to move at all when rotating the cube…

  4. This depends on the number of desktops you have and the layout of your pager of course.

    Personally I don’t think it is worth worrying about.

  5. Thinking Robin’s point and the your suggestion to do the desktop switch from 1 to 4 with a 2×2 layout, you suggest a pair of single-axis rotations, one ‘right’ and one ‘down’.

    This is good because it hides the inconsistency that when you map 3 desktops that do not have a 1:1 aspect raction temporarily onto adjacent faces of a cube, there must be 2 desktops sharing a vertex between a top edge and a side edge.

    But I wonder if it’s possible to construct a cubic transition effect that rotates around 2 axes simultaneously (the chained chest in the corner of my mind where i keep my matrix mathematics just started thumping up and down but I’m ignoring it) that does not look awful.

    Perhaps if the desktop images were mapped during the transition, instead of directly to faces of a cuboid, but to sides of a real cube of side max(x,y), and constantly rotated so that each image’s projected y axis remains parallel to the y axis of the view during the transition? You would see an exploded cube during the transition.

  6. What I’m missing most is the Compiz-like Cube Activation/Deactivation with holding down ctrl+alt+left mousebutton to move the cube and release the buttons to release the cube.

  7. @blueget: Currently not possible as this requires mouse shortcuts and it could only start ctrl+f11 mode. So it will never be the same as with Compiz.

    Btw. ctrl+alt+lmb is what I critizise most about compiz cube. It’s just a terrible shourtcut from accessibility point of view. It’s impossible to use cube if you can only use one hand. And even if you are not handicaped you need both hands to control the cube. KWin cube can be either used via keyboard or mouse only.

  8. Perhaps you are thinking too digital. 4 desktops: imagine the layout of being paper and make a cut between 3 and 4. Now you can fold these flaps inwards and you can choose which of them you want to fold back down before you rotate in any direction. From 1 to 2 and down to 4. Or 2 to 1 and down to 3.

    As you go from 3 to 4 the box would onfold its bottoms before you rotate (zoomed out you would see the sides of the box above its bottoms) and on 4 it would also with inifinite speed fold in the other bottoms and then roll the box backward while you look at a static 4 before you roll with a normal rotation from 4 to 2. (when zoomed out the inifinate speed could be slowed down to make the user enjoy the animation of folding the flaps (which cannot be seen at normal zoom and thus should not slow down rotations)).

    So you can have 8 sides on a physically correctly animated cube with 2 rows of 4 desktops. (In fact you can have 12 over 3 rows: 4 top flaps, 4 sideways-connected middle body and 4 bottom flaps)

    Thank you for the cube animation, I am looking forward to rotating sideways and then rotating up or down when needed. In fact I have made 6 desktop pager into a single row because I disliked it not matching with the cube animation.

  9. Hi!

    Nice idea.

    Want to give another suggestion as you asked. I think that this idea can be applied not only to desktop switch visualization, but also to cube rotation too.

    Let’s say we are in this example:
    | 1 | 2 |
    | 3 | 4 |

    Having this picture in mind, I can think of switching to desktop ‘2’ like about going to the ‘right’ direction; but also as soon as both desktop ‘1’ and ‘2’ are only desktops on the upper row, rotating cube to ‘left’ would also bring me to desktop ‘2’. The same thing with desktop ‘2’. So, cycling desktop cube rotation to left/right horizontally would result switching me between only 2 desktops ‘1’ and ‘2’; ‘3’ and ‘4’ would not appear.

    And exactly the same idea with switching from ‘1’ to ‘3’ – with only difference that rotation would cycle in vertical direction.

    So, in horizontal direction we can switch:

    and in vertical:

    Switching from ‘1’ to ‘4’ would be done with 2 mouse movements – ‘left’,”down” or “down”,”right”.

    I understand that this might break much on current cube concepts – for example, desktop ‘1’ would be drawn on 2 cube borders (on both sides near desktop ‘2’).

    I even think that this concept would be better applied to new “cube2” effect, rather than to current cube. It gives more life to “go up”/”go down”/”go left”/”go right” actions with impressive visual effect; but would not represent desktop as physical 3-d cube – I can’t imagine aquarium inside the cube I have described.

  10. Actually, what I have said is mostly exactly the same thing as written in the article :), except that I think that such option would be good not only for pager switch visualizing, but for manual desktop switching too

  11. Alternative solution:

    Combine desktop grid and cube. If you have a 2×2 grid pager then zoom out revealing 4 quadrants on a single face of the cube and zoom to the new one with no cube rotation. When you have 2×4 then zoom out and possibly rotate once to get to the other 4 desktops. When zoomed out with normal cube effect (not page switch) the quadrant nearest the centre of the screen is the one on that cube face that is activated/zoomed in to or when releasing the cube action the single selected cube face fills the screen and you pick which desktop you want just like desktop grid.

    This is the only way it makes sense to me.

  12. @Matt: but that’s the way making cube useless. As I said our default is 4 virtual desktops and cube is an effect for normal users. Users who want to have cube, because it looks cool, users who want to use cube to show their friends how great Linux is, but do not really use virtual desktops. They won’t change it to 8 desktops. Cube just has to work with four desktop and the only way to do it, is ignoring the pager layout.

    Btw what about 3×3 setups or 2×6, or 4×5, 5×4… It’s just to flexible as it would work 😉

  13. Hi!
    I tested the cube in Kde Effects and its nice, but if u make it acting like the cube in compiz it would have more functionality .
    ctrl + f11 isnt the best way to fast use it.
    would be cool if you implement middle mouse as a trigger or ctrl alt mouse 1 like in compiz.
    but so far nice work

  14. Currently mouse shortcuts are not possible in KDE.

    But even if: there will never be a default shortcut ctrl+alt+lmb for activating the cube as I stated before it is very bad for handicaped users. And it would not make sense at all. Compiz and KWin cube work differently and have different use cases. KWin cube has the show off mode (ctrl+f11) and an animation for changing desktops. It is not really ment to switch the desktop as it is inferior to other ways of switching desktops esp. pager and desktop grid. But the shortcut ctrl+alt+lmb is more or less just for switching desktops. There are much easier ways to do this. And if you want to use cube to show off it’s IMHO easier to just press ctrl+f11 instead of using a complicated shortcut which has to be pressed the whole time.

    Middle click is of course a no-go as it is an important event used by many applications and we cannot remove it. And there is the screen edges which can trigger effects.

  15. Without the ctrl+alt+lmb combo the cube is just useless – the time needed for implementation of the cube effect would have been better spent on other parts of KWin.

    I find it very sad that many potential KWin users are basically told “if you want cube effect that isn’t just a useless show-off-feature, use Compiz”.

    I am aware that mouse shortcuts aren’t possible in KDE currently, but all that talk like “even if it would be possible, we won’t do it” is IMO just turning away users without any benefit for anyone.

  16. Without the ctrl+alt+lmb combo the cube is just useless

    Too bad.

    the time needed for implementation of the cube effect would have been better spent on other parts of KWin

    Yes like the same with any other feature. There will always be users who say “That’s completely useless, you should have done $random_my_favorite_feature”. Luckily working on cube wasn’t useless for me and I’d say that’s the most important part.

    I find it very sad that many potential KWin users are basically told “if you want cube effect that isn’t just a useless show-off-feature, use Compiz”

    Sorry I can’t see the advantage in using ctrl+alt+lmb. Really I don’t. I only see disadvantages and for me doing the right thing in my opinion is more important than copying bad design decisions from Compiz (that’s my personal opinion). Cube in KWin can be used for animations, can be triggered by a shortcut and by a screen edge. It is even possible to get your need with external tools. So if it is useless, then I’m sorry. And yes in that case I’d say use Compiz and be happy. The advantage of open source and free choice.

    I am aware that mouse shortcuts aren’t possible in KDE currently, but all that talk like “even if it would be possible, we won’t do it” is IMO just turning away users without any benefit for anyone

    Sorry I don’t get it. How can that turn users away? It’s hypothetical. It’s not possible to have mouse shortcuts. Till it is possible there is no need to discuss that. And yes: it will never be a default shortcut. If there were mouse shortcuts everybody would be able to set the shortcut. So I really don’t get it.

Comments are closed.