GNOME Bugzilla – Bug 137185
[testcase] doesn't restore maximised state when using gtk_window_move
Last modified: 2005-08-26 22:14:36 UTC
Error viewer doesn't remember the restore state properly. To repro: Open error viewer Maximise Close it Reopen it Try to restore Expected: Restore to original size. Actual: Restores to maximised size.
This is an EphyDialog bug. You can tell because the History window does it too :).
The history window is not an EphyDialog.
Is the size persisted if you just make the window bigger rather than maximizing ?
Yes. When you maximize and then close, it restores to the maximized size but it is not "maximized" per se -- it's just open to whatever size it was when it *was* maximized. So you can't get it back to the original state at all without resizing manually.
Mass reassigning of Epiphany bugs to epiphany-maint@b.g.o
This happens for _all_ windows for which we do gtk_widget_hide(window); return TRUE; in the delete-event handler, and later re-show (gtk_window_present()) the same window again. Window manager but, or gtk+ bug ?
Created attachment 33912 [details] testcase.c
It's the call to gtk_window_move() that seems to cause this problem. If I remove it, all works as expected. Since I also cannot reproduce this in kwin, I assume this is a metacity bug. Re-assigning.
Forgot to mention that this is with metacity 2.8.6 (but also happened with gnome 2.6's version). Steps to reproduce: 0) Compile & run the attached testcase 1) Click the maximise button on the window frame 2) Click the close button on the window frame Expected results: When the window is shown again, it's maximised again. Actual results: When the window is shown again, it occupies the whole screen but is not maximised.
I was hoping to find time for this before 2.10.0. I'll try to take a look during 2.10.x...
I tried to compile the testcase, but it failed because it didn't found the glib and gtk header files. I guess I have to add some comandline options like the pkg-config things? Can somebody tell me how to do this?
gcc testcase.c -o testcase `pkg-config --cflags --libs gtk+-2.0`
*** Bug 169134 has been marked as a duplicate of this bug. ***
Hehe, after reading lots of nasty verbose log information, I finally come find out that window.c:meta_window_free() has the following line in it: /* FIXME restore original size if window has maximized */ I'll attach a patch that does that in just a minute. :)
Created attachment 49048 [details] [review] Unmaximize windows being withdrawn if they've been maximized
Comment on attachment 49048 [details] [review] Unmaximize windows being withdrawn if they've been maximized Looks good, should double check though that meta_window_unmaximize is safe to call in window_free, since the window is partially destroyed already... Maybe you can unmaximize earlier in the function? (In particular before all that unqueue() stuff)
Yeah, it works before all the unqueue stuff so I moved it up there. :) 2005-07-24 Elijah Newren <newren@gmail.com> * src/window.c (meta_window_free): restore original window size if the window was maximized, as the FIXME says. ;-) Fixes #137185. Thanks to Christian Persch for the testcase that made this easier to track down.
*** Bug 308518 has been marked as a duplicate of this bug. ***