GNOME Bugzilla – Bug 161236
Unmaximizing of windows not proper in wireframe mode
Last modified: 2005-11-18 01:58:17 UTC
1. Using gconf-editor, set /apps/metacity/general/reduced_resources to TRUE. 2. Double-click on the titlebar of a window so that the window is now maximized. 3. Double-click on the titlebar again. Bug: The window is not restored to its original size. Expected Behaviour: The window should be restored to its original size. Note: Clicking on the maximize/unmaximize button on the window or selecting Maximize/Unmaximize on the window context-menu works fine.
Created attachment 34818 [details] Screenshot of window before maximizing/unmaximizing with wireframe on
Created attachment 34819 [details] Screenshot of window after maximizing and then unmaxizing.
Action: Double-click - to unmaximize - meta_window_unmaximize () is first called for the button-press event, which restores the window correctly. - next meta_display_end_grab_op () is called. it has a check: if (display->grab_wireframe_active) { .... .... meta_window_move_resize () } Now, this meta_window_move_resize () call is causing the problem. The width and height passed to this call is that of grab_wireframe window, which incidentally is height and width of the previous state (maximized state) Did a quick hack if (display->grab_wireframe_active) { .... .... if (! display->is_double_click) meta_window_move_resize () } This did fix the bug but caused another problem. Doing a double click on the edge of the window to re-size it stopped working.
Bizarre. Tempted to call this major; it's pretty irritating if you're using that combination of settings.
When a window is unmaximized, the wireframe rectangle co-ordinates should also be re-stored to the saved window co-ordinates in meta_window_unmaximize (). This fixes the bug.
Created attachment 35479 [details] [review] patch which fixes the bug
Comment on attachment 35479 [details] [review] patch which fixes the bug Looks like a good idea, thanks.
Committed the patch to HEAD. Thanks.