GNOME Bugzilla – Bug 142198
"show desktop" should only minimize windows in the current desktop
Last modified: 2004-12-22 21:47:04 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.
Sounds reasonable to me...
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. :-)
This is something you'll have to bug Havoc about, but regardless I think it's probably a post-freeze patch.
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.
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
*** Bug 154544 has been marked as a duplicate of this bug. ***
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 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.
Created attachment 32679 [details] [review] Updated patch Good point. Updated to use flags in MetaWorkspace instead.
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.
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.
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.
Created attachment 32947 [details] [review] Revert part of the patch that made an incorrect optimization--add a comment explaining why
Comment on attachment 32947 [details] [review] Revert part of the patch that made an incorrect optimization--add a comment explaining why Thanks, looks good.
committed.