GNOME Bugzilla – Bug 723061
With the headerbar branch, mainwindow's vpanes/hpanes widgets positions always shift on startup
Last modified: 2015-10-20 13:18:54 UTC
I was wondering why I'm readjusting the position of panes so often... turns out they shift a little bit on every startup! So even if you neatly place your panes like the proposed default in bug #702507, they will eventually always end up with the viewer being tall and narrow, because the main+secondary tabs are "pushing" to the right and the upper portion of the UI is "pushing" the timeline down. This is super annoying. On my end, on each startup, - the timeline area is pushed down by 13 pixels - the docked media library tab pushes to the right by 24 pixels (the docked contextual tabs notebook also pushes by 24 pixels) - Undocked components get pushed down by 24px and pushed right by 1 pixel Measurements were done with GIMP's measurement tool (Shift+M) using the overlaid screenshots diffs. Last time I looked, Pitivi was correctly saving the position values. What the heck is going on here...
Created attachment 267265 [details] screenshots and comparisons
I think this is related to Gtk+ allocation algorithm. After the UI setup, some widgets are (wrongly) reallocated. I can think of 2 solutions: - Calculate the ammount of space that will be shifted and load with that - Backtrack to the point that it started happening, and see what caused the changes Note that the current git.gnome.org/pitivi master does not suffer from it.
Interesting... the movement/shifting for *docked panes* happens only on my headerbar branch with the commit that does the switch to the headerbar ("mainwindow: Replace the menubar and main toolbar by HeaderBar and MenuButton") *but*... the shifting behavior of *undocked* widgets (ex: drag out the media library's tab to detach it) happens no matter the branch, I noticed that problem occuring months ago and it still affects master. So we have two similar bugs, one of which only affect the headerbar version.
Okay so this bug report is now about the headerbar branch regression. For the undocked utility windows positioning bug, see bug 692980 instead.
Another interesting detail: this happens only if the window is maximized. So, to summarize, it only happens: - With the headerbar branch, and - When the main window is maximized, and - When utility windows are docked. Result: panes shift a little bit on each startup.
After a whole bunch of tests, prints and etc., found that panels are not shifting, they are being loaded with wrong positions. It is not Gtk+ allocation algorythm fault! The true error is actually when saving the values. At this point, I still don't know why the values are being saved incorrectly. Panels are changing their position on 'delete' event.
Hey Georges (or Alex, or anyone looking at this)... I'm wondering if it's a GTK/Window manager issue related to the "delete" event that Georges mentioned in the previous comment, maybe the components get a configure signal at the last minute when they get deleted?
This bug has been migrated to https://phabricator.freedesktop.org/T3149. Please use the Phabricator interface to report further bugs by creating a task and associating it with Project: Pitivi. See http://wiki.pitivi.org/wiki/Bug_reporting for details.