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 647758 - Hidden then re-shown GtkWindow appears at initially shown position, not latest position
Hidden then re-shown GtkWindow appears at initially shown position, not lates...
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: Other
2.24.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-04-14 10:30 UTC by czk
Modified: 2018-05-02 15:05 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description czk 2011-04-14 10:30:03 UTC
if call gtk_widget_show on a GtkWindow, it was showed at position (ox, oy), then move it to a new position to (x, y), then hide the window, then show it again, the window was showed at (ox, oy), but not (x, y).
I think at the last show, the window should at (x, y) the position I moved previously.

After read the source, I find when mapping a window, gtk_window_compute_configure_request compute it's postion using info->last.configure_request (Of curse, there are other policy). But in the whole file of gtkwindow.c, last.configure_request was never set, except initial time.

I try to modify gtk_window_configure_event, set last.configure_request.x = event->x and last.configure_request.y = event.y in the function. That work as I expect. 

attachment is my test programs.
Comment 1 Daniel Boles 2017-08-28 12:46:17 UTC
Is this still an issue for you? gtk_window_move_resize() unconditionally does this:

  info->last.configure_request = new_request;

but the paths that lead there are many and unclear, on a quick glance.
Comment 2 GNOME Infrastructure Team 2018-05-02 15:05:43 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/358.