GNOME Bugzilla – Bug 692980
With GNOME Shell and Mutter, Pitivi utility windows get configured with +24 pixels of vertical position on every startup
Last modified: 2014-03-29 23:38:39 UTC
Created attachment 234947 [details] screencast In my case, I - connect to "configure-event" and use event.y to save the new Y position - on startup, I get grab the previous Y value (before I connect to "configure-event") and use the "move" method to position it back to the previously saved values. However, as the attached screencast demonstrates, it seems like Mutter is pushing windows downwards when they're being created/configured. So if in my saved file, if I have a Y position of 51, on the next startup the window will be "configured" at 51+24 = 75. Afterwards, it will be at 75+24 = 99, and so on.
The coordinates in the configure event aren't the same ones you pass to gtk_window_move(). See docs for gtk_window_get_position() https://developer.gnome.org/gtk3/stable/GtkWindow.html#gtk-window-get-position
Created attachment 271817 [details] [review] Window position patch This patch corrects loading and saving the window position.
Hi Georges, thanks for the patch to fix the position of the mainwindow... unfortunately, that patch becomes obsolete/unnecessary with the headerbar branch (it is not affected because it does not have the fullscreening code anymore). However, what still needs to be fixed (affecting the headerbar branch) is the position of undocked utility windows - if you would be interested in making a standalone patch for that, the relevant code would be tabsmanager.py Sorry for the confusion, I was not as clear as I could be!
I'm not sure of that... Pitivi still saves window positioning, and the headerbar branch also have this bug.
Created attachment 272287 [details] [review] Utility positioning patch This patch fixes the shifting behaviour of *utility* windows.
Created attachment 272289 [details] [review] Window position patch I personally still think that main window position must be saved correctly. Even with GtkHeaderBar, unmaximized windows save it's position and size. This patch corrects the faulty shifting behavior.
Confirming that the 1st patch solves the problem, and the 2nd patch has no visible changes (it's a "theoretical" patch, but theoretically better)...
Created attachment 272349 [details] [review] Window position patch New patch with a comment explaining the use of get_position().
I took the liberty of reformatting/rewording some small bits of your commit messages. Pushed as: commit 4c09ca62ae4aa72b91cd8808e48d48891aba972c commit 6e894d8e70782e26162ea2a236a20db41bbe7fb6 Thanks, and sorry for the delay! :)