After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 142198 - "show desktop" should only minimize windows in the current desktop
"show desktop" should only minimize windows in the current desktop
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.8.x
Other Linux
: High normal
: future
Assigned To: Metacity maintainers list
Metacity maintainers list
: 154544 (view as bug list)
Depends on:
Blocks: 155453
 
 
Reported: 2004-05-09 15:15 UTC by Sebastien Bacher
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
Make show desktop be per-workspace instead of global (8.37 KB, patch)
2004-08-06 23:32 UTC, Elijah Newren
none Details | Review
Updated patch (8.11 KB, patch)
2004-10-16 18:33 UTC, Elijah Newren
accepted-commit_now Details | Review
Revert part of the patch that made an incorrect optimization--add a comment explaining why (989 bytes, patch)
2004-10-22 20:34 UTC, Elijah Newren
accepted-commit_now Details | Review

Description Sebastien Bacher 2004-05-09 15:15:10 UTC
This bug has been reported in the Debian BTS : 

>      converts "show desktop mode" to "all windows are minimized" when
>       you open a new window 

   Can this be changed so that only windows in the current desktop are
minimised? If I show the desktop, open a new window, and close it, I am
left with dozens of minimised windows in all my desktops. It is then
extremely frustrating to un-minimise all windows again.
Comment 1 Elijah Newren 2004-05-10 14:02:56 UTC
Sounds reasonable to me...
Comment 2 Elijah Newren 2004-08-06 23:32:44 UTC
Created attachment 30294 [details] [review]
Make show desktop be per-workspace instead of global

Note that the spec (http://tinyurl.com/4u4oa) says that _NET_SHOWING_DESKTOP
can be ignored by the window manager.  I took the liberty to assume this
implied that the window manager can also interpret it as a per-desktop quantity
(the spec most definitely doesn't state that it can't be interpreted this way).
 Thus, my patch also toggles _NET_SHOWING_DESKTOP when switching workspaces if
it's set on one workspace but not the other.

This patch works very nicely for me.  The show-desktop applet on the panel even
updates when I switch workspaces to show whether I'm in "show desktop" mode for
that workspace or not.	:-)
Comment 3 Rob Adams 2004-08-07 01:53:54 UTC
This is something you'll have to bug Havoc about, but regardless I think it's
probably a post-freeze patch.
Comment 4 Elijah Newren 2004-08-07 03:03:00 UTC
Yeah, I'm guessing he may shake his head at my creative interpretation of
_NET_SHOWING_DESKTOP.  But I agree with you, it's a UI change so it should wait.
 I'm setting target milestone to future, as well as updating some of the other
fields.
Comment 5 Havoc Pennington 2004-08-07 16:51:28 UTC
I think this is a good idea, but it wouldn't hurt to post to wm-spec-list and
say we're wanting to do it.

It might have been cleaner if _NET_SHOWING_DESKTOP were an array if we were
going to do this, but I guess it works as-is
Comment 6 Elijah Newren 2004-10-05 14:39:49 UTC
*** Bug 154544 has been marked as a duplicate of this bug. ***
Comment 7 Elijah Newren 2004-10-13 19:00:22 UTC
Is it okay to apply this now that we've branched?  (I emailed wm-spec-list and
they didn't have any objections; it appears that KDE is already doing something
similar)
Comment 8 Havoc Pennington 2004-10-16 15:25:25 UTC
Comment on attachment 30294 [details] [review]
Make show desktop be per-workspace instead of global

A high-level question on this patch is why keep a list of workspaces on the
screen, rather than just a flag in the MetaWorkspace struct?

The list introduces list corruption type of bugs, e.g. you have to remove a
workspace from the list when the space is destroyed.
Comment 9 Elijah Newren 2004-10-16 18:33:36 UTC
Created attachment 32679 [details] [review]
Updated patch

Good point.  Updated to use flags in MetaWorkspace instead.
Comment 10 Havoc Pennington 2004-10-17 00:26:01 UTC
Comment on attachment 32679 [details] [review]
Updated patch

I'd put parens in this, so people don't have to check their C book for the
precedence of ^: old && old->showing_desktop ^ workspace->showing_desktop

That's the only nitpick I can come up with ;-)

I don't know if this should go on both branches or only HEAD, any opinion? I'm
fine with either way I guess.
Comment 11 Elijah Newren 2004-10-17 04:37:47 UTC
Hmmm, I dunno.  Well, Michael claims that this behavior "makes show-desktop a
mine-field" (bug 154544), and I guess that means this is bad so I'll commit to
both branches--with the added parentheses for clarification.
Comment 12 Elijah Newren 2004-10-22 20:33:16 UTC
Part of the patch was an ill-advised optimization and should probably be
reverted on the stable branch (though it only affects sticky windows so it's not
a real big deal).  I'll attach the patch in just a minute.
Comment 13 Elijah Newren 2004-10-22 20:34:25 UTC
Created attachment 32947 [details] [review]
Revert part of the patch that made an incorrect optimization--add a comment explaining why
Comment 14 Havoc Pennington 2004-10-25 15:32:06 UTC
Comment on attachment 32947 [details] [review]
Revert part of the patch that made an incorrect optimization--add a comment explaining why

Thanks, looks good.
Comment 15 Elijah Newren 2004-10-25 16:09:17 UTC
committed.