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 335076 - Maximizing and unmaximizing windows doesn't raise them
Maximizing and unmaximizing windows doesn't raise them
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
trunk
Other Linux
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2006-03-19 02:13 UTC by Björn Lindqvist
Modified: 2006-04-16 02:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Raise window that are (un)maximized (2.82 KB, patch)
2006-04-15 20:05 UTC, Dan Sanders
needs-work Details | Review
Raise windows when they are (un)maximized (3.66 KB, patch)
2006-04-15 22:52 UTC, Dan Sanders
committed Details | Review

Description Björn Lindqvist 2006-03-19 02:13:51 UTC
1. Open two windows
2. Press the maximize button of the unfocused window.
2. Or right click on the unfocused windows button in the window list and choose maximize.

The window will be maximized and focused but not raised. The same thing happens when you unmaximize windows.
Comment 1 Elijah Newren 2006-03-29 05:37:36 UTC
This isn't so surprising.  We also used to have a similar bug when alt-middle-clicking to resize, alt-right click to show the menu, or just right click on the title bar to show the menu.  We didn't search very carefully for all the other cases we needed to handle to make sure we got raising right.  :)

Anyway, shouldn't be hard to fix.  meta_core_show_window_menu() has code for checking if we should raise that could go into meta_core_*maximize().  Do we really want the window raised when someone selects maximize/unmaximize from the window list, though?  If so, that part would be added in meta_window_client_message().

Probably a good task for a beginner; I'm adding the gnome-love keyword.
Comment 2 Dan Sanders 2006-04-15 20:03:56 UTC
This is my first ever patch, so please bear with me. (And tell me what I did wrong)

I opted to raise windows that are (un)maximized using the window list because resize and move so that already.
Comment 3 Dan Sanders 2006-04-15 20:05:04 UTC
Created attachment 63605 [details] [review]
Raise window that are (un)maximized
Comment 4 Elijah Newren 2006-04-15 20:24:14 UTC
Comment on attachment 63605 [details] [review]
Raise window that are (un)maximized

Cool, thanks for contributing; your patch looks good in general.  As is common, there are a few things to fix up:

For future patches, please use the -p flag when creating the patch (looks like you used cvs diff -u, which is good, but cvs diff -up is much better).

You have a number of changes like
>-
>+  
that only involve change the number of spaces on a line.  That makes the patch longer and harder to review, plus is annoying as far as cvs history goes.  After creating a patch, just look at it and edit out stuff like this that accidentally creeps in.  :)

I like your reasoning for the change in behavior for maximize/unmaximize from the window list.  So, sounds good to me.  However, you put the change in meta_window_maximize() and meta_window_unmaximize().   I'd much prefer that it went into meta_window_client_message() (just look for "maximize" in that function).
Comment 5 Dan Sanders 2006-04-15 22:52:04 UTC
Created attachment 63614 [details] [review]
Raise windows when they are (un)maximized
Comment 6 Elijah Newren 2006-04-15 23:05:28 UTC
Looks good to me.  Can you type up an entry for the changelog (just stick it in a comment in this bug)?  After that, I'll commit it.  Thanks.  :)
Comment 7 Dan Sanders 2006-04-16 00:28:36 UTC
* src/core.c, src/window.c: Raise windows on maximize/unmaximize.  Fixes #335076.