GNOME Bugzilla – Bug 647758
Hidden then re-shown GtkWindow appears at initially shown position, not latest position
Last modified: 2018-05-02 15:05:43 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.
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.
-- 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.