GNOME Bugzilla – Bug 335076
Maximizing and unmaximizing windows doesn't raise them
Last modified: 2006-04-16 02:20:56 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.
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.
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.
Created attachment 63605 [details] [review] Raise window that are (un)maximized
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).
Created attachment 63614 [details] [review] Raise windows when they are (un)maximized
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. :)
* src/core.c, src/window.c: Raise windows on maximize/unmaximize. Fixes #335076.