Ubuntu

The modal behavior of "Show Desktop" is confusing

Reported by Alexander Jones on 2007-03-12
160
This bug affects 28 people
Affects Status Importance Assigned to Milestone
Compiz
Confirmed
Low
One Hundred Papercuts
Low
Unassigned
compiz (Ubuntu)
Wishlist
Sam Spilsbury
Nominated for Karmic by tambornm

Bug Description

Binary package hint: compiz

Try this:

Open two windows
Hit "show desktop" in the bottom left
Restore one of the windows

Notice how the show desktop state remains "on". This differs from Metacity's behaviour and causes something unexpected when it is hit again.

At this stage you have one window open. From Metacity's behaviour, you would expect that the Desktop is now "inactive", much like a window would be if it was minimised. Clicking the button, therefore, would cause the Desktop to show again, and hide all open windows. It doesn't. It restores the windows that were hidden previously.

If we're going to have Compiz and Metacity doing bling and non-bling, their behaviours with small stuff like this should be consistent.

ProblemType: Bug
Architecture: i386
Date: Mon Mar 12 22:44:20 2007
DistroRelease: Ubuntu 7.04
Uname: Linux flash 2.6.20-9-generic #2 SMP Mon Feb 26 03:01:44 UTC 2007 i686 GNU/Linux

Changed in compiz:
importance: Undecided → Wishlist
status: Unconfirmed → Confirmed
Alexander Jones (alex-weej) wrote :

It seems Compiz's behaviour is similar to Mac OS's where this function is intended to temporarily reveal the desktop while you do something. Triggering the function again restores all the windows that were previously hidden.

However, we are doing it wrong:

Firstly, the windows are minimised, and their visual effect makes this very apparent. On Mac OS, the windows slide off to the screen edges to make it look as if you are clearing them out of the way of the desktop.

Secondly, the Show Desktop button actually says in its tooltip: "Click here to hide all windows and show the desktop. /Minimize/ visible windows Ctrl+Alt+D".

This is not behaving as it describes. This should be upgraded from Wishlist as a usability bug.

Travis Watkins (amaranth) wrote :

So you're saying we should enable the "showdesktop" plugin by default? The actual show desktop stuff is pluggable. The default is minimize, 'showdesktop' makes it work like OS X, and 'fadedesktop' makes it...well, fade.

The behavior still seems wrong. As was stated in the original message, the default behavior of the show desktop button in metacity is to show the desktop every time it's clicked. It doesn't have a toggled state. The compiz version of it should have a option to behave the same way.

seanh (seanh) wrote :

The compiz version should simply behave like the metacity version, an option to have it behave this way is a "fix me" option. It's called the Show Desktop button and the tooltip says it will "hide all windows and show the desktop", and yet sometimes when you click it a minimised window pops up, rather than all maximised windows minimising. That's just plain wrong.

And the behaviour is inconsistent also, sometimes if you press the button it will minimise all maximised windows, other times it will maximise some minimised windows. Just silly.

I also think this is more important than just "wishlist", it's one of the basic desktop features, the button is right there in one of the four screen corners by default, yet it's broken.

seanh (seanh) wrote :

About the alternative "Show Desktop" plugin that can be activated by CompizConfig Settings Manager, I think this is badly designed from a usability point of view also. It has the same problem that the current default behaviour has, that sometimes the Show Desktop button will show the desktop, and other times it will cause hidden windows to unhide. In other words the button is modal, which is a bad thing. The Show Desktop plugin is slightly better because when there are hidden windows you can see still see them in the corners, so at least you have an indication of what mode you are in, but this is still modal.

In metacity Show Desktop simply shows the desktop whenever you click it. It's not modal. This is the right way.

Modal interfaces are bad because human users cannot pay attention to both system state (mode) and the task they are performing at the same time. So they end up performing actions for one mode while the system is in another mode, producing the wrong results. For example with Ubuntu/Compiz right now users frequently forget the mode of the Show Desktop button and click, expecting to see the desktop, only to be baffled when instead a new window pops up, and they have to click the button again. Accidentally typing a password with your keyboard in caps-lock mode is another example of a mistake caused by a modal interface.

But all this is just details ... it is simply baffling right now when you click the "Show Desktop" button and a bunch of minimised windows pop up instead. New users will not understand what is going on at all.

seanh (seanh) wrote :

It's also possible for the Show Desktop button to do nothing when clicked right now. If you have one window open, press the Show Desktop button to hide it, then click on the window in the window list in the panel to unhide it, (if you are using the Show Desktop plugin this causes the mode indicator to disappear even though the mode hasn't changed), then press the Show Desktop button, nothing happens. Press Show Desktop again and it hides the window again.

Travis Watkins (amaranth) wrote :

The metacity one is modal too, it just automatically disables itself when a window is mapped (created or restored).

Created an attachment (id=18505)
Proposed patch

The _NET_SHOWING_DESKTOP property should be set to 0 when a window is shown, thereby indicating that compiz is no longer "showing the desktop".

This would match Metacity's behavior more closely and allow the standard GNOME "Show Desktop" panel applet to work correctly:

Metacity & "Show Desktop":
1) Open some windows
2) Press "Show Desktop", note how windows are hidden and button is depressed
3) Unminimize a window or open a new window, note how button is now popped back up (because Metacity set _NET_SHOWING_DESKTOP to 0)
4) Press "Show Desktop" again, note how only the new window is hidden again.

Compiz & "Show Desktop":
1) Open some windows
2) Press "Show Desktop", note how windows are hidden and button is depressed
3) Unminimize a window or open a new window, note how button does not change
4) Press "Show Desktop" again, note how it pops back up and unminimizes previously hidden windows. This is unexpected, since if I have windows obscuring the desktop and I press "Show Desktop", I want to see the desktop.

So, the fix seems easy enough. Whenever a window is shown in compiz, unset the _NET_SHOWING_DESKTOP (for some user-useful definition of window -- obviously not popup menus and the like).

I'm attaching a patch, but I know it isn't perfect, because I don't know compiz internals well. It basically adds two checkpoints for unsetting _NET_SHOWING_DESKTOP -- when showing a window and creating a window. I copied the logic for what kind of windows 'count' for unsetting the property from the logic deciding which windows to hide when "Show Desktop" is pressed (in screen.c:enterShowDesktopMode()). However, the 'managed' flag doesn't seem to be correctly set at create-window time? So I had to create a copy of focusWindow() that ignored it. I'm open to feedback. :)

This is a very annoying usability issue. Hope to see a solution soon..

Changed in compiz:
status: Confirmed → Triaged
Changed in compiz:
status: Unknown → Confirmed
summary: - Compiz's "show desktop" functionality differs to Metacity's
+ "Show desktop" functionality differs to Metacity's

The proper fix for this would be to enable the showdesktop plugin by default, not to change the compiz show desktop behavior. Upstream does not want to make such a change and the show desktop button on the panel now properly stays pressed when in compiz show desktop mode even after opening more windows.

The only thing missing at this point to make this feature make sense is to do the OS X-like animation of moving windows to the edges of the screen instead of minimizing them.

Last time we looked, showdesktop had pretty bad bugs and managed to lose
windows! Have things changed?

Not only does the showdesktop plugin have the exact same problem, it also behaves totally differently from Metacity, by sliding the windows to the sides of the screen instead of minimizing them.

So no, the proper fix is not the showdesktop plugin. Fix the toggle functionality in both plugins, so they behave as expected when some windows are not shown and others are shown.

Travis Watkins (amaranth) wrote :

Different apps behave differently. I don't see the point in modifying compiz behavior and carrying such a patch in Ubuntu forever when we can make the difference obvious and nice to use.

Endolith (endolith) wrote :

I'm not sure what that comment means, but the point of my comment is that BOTH the default functionality (which minimizes windows) and the "Show desktop" plugin (that slides them off the screen) have the problem described in this bug. Neither behaves correctly, so enabling the showdesktop plugin by default doesn't solve anything.

1. Show desktop
2. Open one of the windows
3. Show desktop again

The one window that is open should disappear, but instead all the other windows reappear.

The fact of the matter is that is not going to happen. Compiz show desktop functionality is not going to change but we can make it more obvious why/how it is different by enabling the showdesktop plugin.

summary: - "Show desktop" functionality differs to Metacity's
+ "Show desktop" is confusing
Endolith (endolith) wrote :

Why isn't it going to change? That's what this bug is about.

Guys this is an age old argument. I advise you take the argument upstream
with Compiz because Travis has made it very clear that we are not going to
change the default behaviour here.

Martin Albisetti (beuno) on 2009-06-22
Changed in hundredpapercuts:
status: New → Confirmed

If upstream's not going to fix it, can't Ubuntu patch it to do the right thing?

If Ubuntu developers refuse to patch compiz (which can be understood), and if the same developers reckon that compiz behaviour is wrong (which I suppose they do), and if upstream refuses to fix this bug (which seems to be the case), there remain only two solutions:
 - create a plugin for compiz that enables the correct behaviour, provide it with ubuntu, and enable it by default.
 - remove compiz from Ubuntu.

Travis Watkins (amaranth) wrote :

I do not think the compiz behavior is wrong, just hard to understand.

Changed in hundredpapercuts:
milestone: none → round-6
Endolith (endolith) wrote :

If you are viewing a window and you press Show Desktop, it does not show the desktop. This behavior is definitely wrong.

"create a plugin for compiz that enables the correct behaviour, provide it with ubuntu, and enable it by default."

Or, if there's some legitimate reason for it to behave this way, the existing plugin could have an option added to it to behave either way? They have lots of other options already.

"I do not think the compiz behavior is wrong, just hard to understand."

If we admit it's hard to understand, then it's practically impossible for average users to understand, and features that are so difficult to understand /are/ wrong when they're included in Ubuntu, even if their developers intended the features to be that way. The Compiz Show Desktop plugin is nice, but would require a bit more planning and development (it doesn't play nice with the window list). Here's a simple set of rules that the Show Desktop button should observe.

when ("Show Desktop" is clicked):
    if (all windows are minimized):
        unminimize all windows
    else:
        minimize all windows

The visual indication of a modal state should also be removed.

summary: - "Show desktop" is confusing
+ The modal behavior of "Show Desktop" is confusing

That behaviour is exactly what Metacity already does, but the state
(pressed/unpressed) is still working, and sane!

The real problem here is that Compiz developers decided they liked the Mac
OS behaviour of revealing the desktop, so implemented it as such, but did it
half-arsed.

* We are using a minimise animation even though the windows are really in
some other state. Windows fly off to the edges of the screen on Mac OS and
remain visible, including a very obvious darkened border around the screen.
You KNOW when you are in this state, whereas you tend to forget in Compiz.

* When calling up a new window, the hidden windows stay as such. I am
unclear as to the logic in Mac OS but it really does just seem to work
without getting it wrong.

As a result, myself and I'm sure other people tend to accidentally leave
Compiz in the "show desktop" state whilst actually having many windows open.
I am doing so right now. In fact, I have really just gotten used to clicking
the button twice instead of once every time I want to show the desktop.

I don't know how this has passed so many distros' QA, but it's pretty
embarrassing if you ask me.

To follow up on Alexander Jones,

On Mac OS X, when the desktop is shown and all windows are shoved to the side, as soon as you click any window, or open a new one, all windows slide back into place (covering the desktop) with the window you activated/opened still in focus of course.

On Tue, 2009-08-11 at 17:24 +0000, Ulrik Sverdrup wrote:
> To follow up on Alexander Jones,
>
> On Mac OS X, when the desktop is shown and all windows are shoved to the
> side, as soon as you click any window, or open a new one, all windows
> slide back into place (covering the desktop) with the window you
> activated/opened still in focus of course.
>

IIRC, Compiz offers a different plugin (not enabled by default) that
behaves exactly the same.

Vish (vish) wrote :

Fiddler , actually it doesnt , it is one of the bugs,
From desktop 1 , if you press show desktop ,and now select one of the windows from the windows list ,
the selected window does not slide back... rather compiz behaves as if the window was in the adjacent desktop[2/3/4] and switches desktops to 2/3/4...
But the window is not visible! since the window has now minimized in desktop 1 !

I dont see the plugin as hard to understand , but rather buggy.

Ideally : selecting the window should bring back only that particular window , but leave all other windows in the sides.
only pressing the show desktop should bring back all windows.

Travis Watkins (amaranth) wrote :

It seems the main difference between how OS X handles this and how compiz with the showdesktop plugin handles this is that in OS X when you select one of the apps that is already running it brings them all back and puts the windows for that app on top of the stack. This is a small enough change that can probably be accepted upstream. If I'm remembering correctly the main thing upstream did not want to lose was the "enable show desktop, open some windows and work with them, disable show desktop to bring all the others back" functionality.

Alexander Jones (alex-weej) wrote :

I've just had a friend who I didn't even know used Ubuntu email me with this bug report which I reported in the first place!

I think we just need a "minimize all windows" keyboard shortcut / button. That way we can be explicit about what it does and not care about what Compiz upstreams want to do.

twiss (danielhuigens) wrote :

I think it would be better if it would be this:

when ("Show Desktop" is clicked):
    if (all windows are minimized):
        restore last window state;
    else:
        minimize all windows;

i.e., if you have 2 windows running and 1 opened, click show desktop to show the desktop, click it again and you have your single window back.

theenduser (stijnverwaaijen) wrote :

It's funny to read this thread. This bug/feature or whatever you want to call it has been keeping me from using compiz for about two years now and I'm sure I'm not the only one... The option twiss proposes seems a good one. Hope this will be "fixed" soon. My comment will not help fixing this, I'm aware of this.

Greg (greg-humhost) wrote :

I'm just glad I finally know how to work around the bug, even though the
answer is to disable compiz. It's understandable that a bug cannot be
fixed quickly... But major interface bugs that exist for a year or more
should come with a warning for the user.

 It's fine that you can't fix the pothole, but put up an orange cone
until you can fix it.

5oak wrote:
> It's funny to read this thread. This bug/feature or whatever you want to
> call it has been keeping me from using compiz for about two years now
> and I'm sure I'm not the only one... The option twiss proposes seems a
> good one. Hope this will be "fixed" soon. My comment will not help
> fixing this, I'm aware of this.
>
>

Alexander Jones (alex-weej) wrote :

The problem is the complete unwillingness of Compiz hackers to budge
and the unwillingness of Ubuntu devs to maintain a diff. I suggest any
interested party:

1. Learns how to correct the behaviour in Compiz
2. Pushes a branch to Launchpad
3. Runs a PPA with the change

Then basically all of the work is done, people can use it and test it,
and it just needs to be merged.

2009/11/2 Greg <email address hidden>:
> I'm just glad I finally know how to work around the bug, even though the
> answer is to disable compiz. It's understandable that a bug cannot be
> fixed quickly... But major interface bugs that exist for a year or more
> should come with a warning for the user.
>
>  It's fine that you can't fix the pothole, but put up an orange cone
> until you can fix it.
>
>
> 5oak wrote:
>> It's funny to read this thread. This bug/feature or whatever you want to
>> call it has been keeping me from using compiz for about two years now
>> and I'm sure I'm not the only one... The option twiss proposes seems a
>> good one. Hope this will be "fixed" soon. My comment will not help
>> fixing this, I'm aware of this.
>>
>>
>
> --
> The modal behavior of "Show Desktop" is confusing
> https://bugs.launchpad.net/bugs/91784
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Icek (petr-mahdalicek) wrote :

I'm using this workaround for this bug:

- remove "show desktop" button from panel
- install wmctrl
- add custom application launcher with this command: "wmctrl -k on" and some nice icon

that's it ;-)

Changed in hundredpapercuts:
milestone: round-6 → none
Greg (greg-humhost) wrote :

So what does it mean that this bug has gone from milestone: none -> round - 6 to round-6 -> none?

Is the bug too hard to fix? Is it not important enough? Is it going to be fixed later, if so, when and by whom?

Changed in compiz:
importance: Unknown → Low
Dave Ahlswede (mightyquinn) wrote :

Please, please don't "fix" this behavior! It makes show desktop actually useful...unlike Metacity where, if something happens to pop up a dialog, or if you do *anything* with other windows, you have to manually unminimize all your windows.

Travis Watkins (amaranth) wrote :

So the best way of making the current functionality understandable is to fix the showdesktop bugs and tweak it a bit. Basically instead of showdesktop moving windows it should shape their input away, move their _textures_ to the sides of the screen, draw a black bar around the edge of the screen, and make it so when you click on the edge you exit show desktop mode. Also, opening new windows should not exit show desktop mode but trying to show a current hidden window should.

Yes, I realize this is exactly how OS X does it but that's sort of the point; we like that method of doing it but never quite got there.

Changed in compiz (Ubuntu):
assignee: nobody → Sam "SmSpillaz" Spilsbury (smspillaz)
Alexander Jones (alex-weej) wrote :

Travis I've been saying this for at least 2 years, no? :P

On 8 November 2010 01:02, Travis Watkins <email address hidden> wrote:

> So the best way of making the current functionality understandable is to
> fix the showdesktop bugs and tweak it a bit. Basically instead of
> showdesktop moving windows it should shape their input away, move their
> _textures_ to the sides of the screen, draw a black bar around the edge
> of the screen, and make it so when you click on the edge you exit show
> desktop mode. Also, opening new windows should not exit show desktop
> mode but trying to show a current hidden window should.
>
> Yes, I realize this is exactly how OS X does it but that's sort of the
> point; we like that method of doing it but never quite got there.
>
> ** Changed in: compiz (Ubuntu)
> Assignee: (unassigned) => Sam "SmSpillaz" Spilsbury (smspillaz)
>
> --
> The modal behavior of "Show Desktop" is confusing
> https://bugs.launchpad.net/bugs/91784
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Travis Watkins (amaranth) wrote :

Of course, Sam requested I wrap it all up in one comment when assigning it to him.

Vish (vish) wrote :

In Ubuntu 10.10 Unity there is no 'Desktop' and no icons can be placed on the desktop.
Previously when we had Files/launcher icons on the Gnome Desktop this Show Desktop plugin had a purpose, not sure why we need to see the desktop now..

If we are not going to change this behavior for Unity 11.04, what is the point of this plugin? Are we changing this behavior?

Changed in hundredpapercuts:
importance: Undecided → Low
status: Confirmed → Incomplete
Vish (vish) wrote :

Didier just confirmed that the behavior will be changing for Natty and we will have desktop icons in Unity...

Changed in hundredpapercuts:
status: Incomplete → Triaged
Changed in hundredpapercuts:
assignee: nobody → Papercuts Ninja (papercuts-ninja)
Vish (vish) wrote :

Sam Spilsbury has already been assigned the bug.

Changed in hundredpapercuts:
assignee: Papercuts Ninja (papercuts-ninja) → nobody
Changed in compiz:
importance: Low → Unknown
Changed in compiz:
importance: Unknown → Low

Hi all,

is this still in progress? I would like to see the behaviour also changed so that it detects any open window and resets itself so that the next click on Show Desktop minimizes everything. It's like this in metacity and windows.
I probably filed a duplicate bug here:

https://bugs.launchpad.net/compiz-core/+bug/926695

More info on the issue in that post, please read if you are confused here.
I also strongly believe that the Show Desktop button should be smarter instead of being just a toggle.
It should reset its state to 'inactive" when a new active window has been detected so that any next click will minimize everything.

Thanks Icek for post #36. This is a nice workaround when you can put such a launcher in a panel. Mine is xfce4-panel, so I'm good now.
However, it is not a good solution for the Unity launcher, since once the button is pressed, it will remain unclickable for a few seconds --> button lights up a few times. And you want such a button to be instantly clickable.

Alessandro Checco (blasphemie) wrote :

in 12.04 even with alt+tab we have this behaviour. So if by mistake I switch to "show desktop", then I switch to another windows, all the remaining window stay hidden and the status of "show desktop" is confusing: I have to choose again "show desktop" to resume the remaining windows.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.