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 136666 - Window switching popup should use same nomenclature as window list for minimized windows
Window switching popup should use same nomenclature as window list for minimi...
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
trunk
Other All
: High normal
: 2.10.x
Assigned To: Metacity maintainers list
Metacity maintainers list
: 164089 (view as bug list)
Depends on: 91655
Blocks: 155456
 
 
Reported: 2004-03-09 18:20 UTC by Calum Benson
Modified: 2005-01-21 18:52 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
dimm the window icon if the window is minimized (3.98 KB, patch)
2005-01-14 18:14 UTC, Vincent Noel
none Details | Review
better patch (3.99 KB, patch)
2005-01-14 18:39 UTC, Vincent Noel
none Details | Review
Even better patch (4.52 KB, patch)
2005-01-14 19:12 UTC, Vincent Noel
none Details | Review
So much better patch (5.00 KB, patch)
2005-01-14 20:15 UTC, Vincent Noel
needs-work Details | Review
muchos muchos better patch (6.42 KB, patch)
2005-01-18 14:31 UTC, Vincent Noel
accepted-commit_now Details | Review
slight change... (536 bytes, patch)
2005-01-21 00:48 UTC, Elijah Newren
none Details | Review

Description Calum Benson 2004-03-09 18:20:19 UTC
Minimized windows are shown in square brackets on the window list, but not
in the Alt-Tab popup... should probably do the same for both.  (Apologies
if it does now, I'm not sitting in front of a very recent version of
metacity right at the moment...)
Comment 1 Rob Adams 2004-03-09 18:36:50 UTC
it doesn't currently, and it should, I agree.  Are we allowed to
change stuff like that for Gnome 2.6 right now?  I would classify it
as "bug fix", and it doesn't involve a string change.
Comment 2 Elijah Newren 2004-10-14 22:50:47 UTC
May also be nice to make the icon dimmer, as the tasklist appears to be doing.
Comment 3 Elijah Newren 2005-01-14 17:27:48 UTC
*** Bug 164089 has been marked as a duplicate of this bug. ***
Comment 4 Vincent Noel 2005-01-14 18:14:54 UTC
Created attachment 36024 [details] [review]
dimm the window icon if the window is minimized

Sorry for the duplicate :|
Here is a patch that dimms the window icon when the window is minimized.
Comments welcome :)
Comment 5 Vincent Noel 2005-01-14 18:39:50 UTC
Created attachment 36025 [details] [review]
better patch

Here is a better patch (read : one that does not make your computer crash when
you switch workspace).
Comment 6 Elijah Newren 2005-01-14 18:56:06 UTC
Oh, sure...submit the fixed patch after I have a valgrind log showing the
invalid reads and the crash.  :-)  But, yeah, the new patch works nicely and is
valgrind-clean.  (Unfortunately, several other things in Metacity aren't.  If
you could fix them, you'd be my hero.  *hint* *hint*)

The tasklist also brackets the description of minimized windows.  Shouldn't we
do the same here?  There's also bug 91655 which is arguing about how and whether
minimized windows should be marked, but I doubt it's going anywhere anytime soon
and it'd be nice to have Metacity match libwnck in the Gnome 2.10 release.

Havoc: I added the 2.10.x target milestone and threw this bug on it.  Kick me if
you don't like that and I wasn't supposed to.
Comment 7 Vincent Noel 2005-01-14 19:12:17 UTC
Created attachment 36026 [details] [review]
Even better patch

Here is an even better patch, that puts the title of minimized windows in
brackets []. Note also that the function meta_ui_tab_popup_new is kinda
crowded... :P
Comment 8 Vincent Noel 2005-01-14 19:14:05 UTC
Oh, and sorry about the crashing patch :D 
I could very well picture PCs crashing everywhere as people were testing this ;-)
Comment 9 Elijah Newren 2005-01-14 19:42:51 UTC
No worries.  :)

A few nitpicks (note that Havoc has to do the real review, but he's likely to
point out these same issues):

You have a fair number of interspersed tabs and spaces on lines, whereas the
surrounding lines don't seem to have tabs.  (In general Metacity doesn't seem to
have tabs, though they seem to have annoyingly crept in--I don't know what
Havoc's exact opinion on this is, but consistency with surrounding code is
probably best)  

You have some braces that don't align.

It would help with review if you could submit patches made using the -p option.
Comment 10 Vincent Noel 2005-01-14 20:15:25 UTC
Created attachment 36029 [details] [review]
So much better patch

This (I hope) last patch tries to follow the metacity indentation rules : 2
spaces/no tabs.
Comment 11 Rob Adams 2005-01-14 21:22:56 UTC
the general rule in the metacity codebase is spaces not tabs.  In emacs M-x
untabify is a convenient way to "fix" a section of code.
Comment 12 Havoc Pennington 2005-01-15 07:21:58 UTC
(setq-default indent-tabs-mode nil)
Comment 13 Havoc Pennington 2005-01-15 07:26:53 UTC
Comment on attachment 36029 [details] [review]
So much better patch

Does libwnck use the minimized flag only or does it also show "hidden" windows
as minimized? I don't remember, just asking.

Doesn't GTK have a pixbuf_saturate_and_pixelate or something that can be used
to dim an icon? this comment may apply to libwnck also.

Do we always create icon pixbufs with alpha? If not you may need to use
pixbuf_add_alpha or whatever it is.

I'm a little worried that dimming a ton of icons will make alt+tab come up too
slowly, but I guess we can wait and see.

guint minimized should have a :1 after it in the TabEntry struct.

Looks good overall, nice change. Thanks!
Comment 14 Vincent Noel 2005-01-18 14:31:15 UTC
Created attachment 36182 [details] [review]
muchos muchos better patch

Here is the same patch taking care of pixbuf without alphas, and adding a :1 in
the structure definition.

Havoc : what do you mean by "hidden" windows ?
The function gdk_pixbuf_saturate_and_pixelate exists, but it can only modify
the saturation, ie it darkens or lightens the icon. Dimming is different, I
think.
Comment 15 Havoc Pennington 2005-01-18 16:28:00 UTC
Comment on attachment 36182 [details] [review]
muchos muchos better patch

Looks sane to me.

Hidden is a thing in the EWMH, that covers reasons a window may not be visible
other than minimization.
If libwnck is using an "if (minimized)" check then it's OK for us to do it
also.
Comment 16 Elijah Newren 2005-01-18 16:38:55 UTC
Well, Havoc already responded, but I started typing this up before seeing his
response...

"Hidden" windows mean windows that shouldn't be shown in the pager (see the
_NET_WM_STATE_HIDDEN property in the EWMH spec).  This is supposed to be defined
in Metacity to mean that the window is minimized (or its ancestor if the window
is a transient) or shaded or that it is on a workspace which is in the "show
desktop" state and it is neither a desktop or a dock window.  I say supposed to,
because I apparently broke it with my patch in bug 105665...  Anyway, a lot of
rules, but basically see window_showing_on_its_workspace() in window.c (minus
the shaded bug).

Anyway, I don't think it causes any problem here from testing your patch, but I
need to file a separate bug about the shaded thing (and about place.c:751 using
window->minimized when it should be doing something more thorough...)
Comment 17 Vincent Noel 2005-01-18 16:50:11 UTC
Ok, thanks for the explanations.

I committed the patch, thanks for all the help. I'm marking as fixed, please
feel free to re-open if you run into any issue.
Comment 18 Elijah Newren 2005-01-18 17:10:43 UTC
Thanks for the awesome patch, Vincent.  This makes alt-tabbing much nicer for
me.  :-)
Comment 19 Vincent Noel 2005-01-18 17:22:18 UTC
You're welcome ;-) I confess that in this case my motivation was very selfish -
I wanted to improve my own task-switching experience (hence this patch and bug
#163854) :P
Comment 20 Elijah Newren 2005-01-21 00:48:27 UTC
Created attachment 36317 [details] [review]
slight change...

Vincent: I'm getting crashes with the patch you applied.  I didn't look at the
code very closely, but I've attached a one-line patch that seems to correct the
issue.	Is this what you had in mind, or should I be using something else here?
Comment 21 Vincent Noel 2005-01-21 01:39:02 UTC
Elijah : yeah, that is definitely right.
I don't understand how 1. I missed that and 2. I didn't get any crash yet.
Please commit if you can - I won't be able to fix that until tomorrow morning ;)
Comment 22 Elijah Newren 2005-01-21 02:00:35 UTC
Vincent: Okay, thanks.

Havoc: Since it's causing some crashes, looked like an obvious fix, and it's
just a one-liner, I went ahead and committed the last attached patch.  :)
Comment 23 Havoc Pennington 2005-01-21 18:52:56 UTC
Comment on attachment 36317 [details] [review]
slight change...

All good, thanks.