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 692980 - With GNOME Shell and Mutter, Pitivi utility windows get configured with +24 pixels of vertical position on every startup
With GNOME Shell and Mutter, Pitivi utility windows get configured with +24 p...
Status: RESOLVED FIXED
Product: pitivi
Classification: Other
Component: User interface
0.91
Other Linux
: Normal normal
: 0.94
Assigned To: Georges Basile Stavracas Neto
Pitivi maintainers
Depends on:
Blocks: 682886 723061
 
 
Reported: 2013-02-01 03:46 UTC by Jean-François Fortin Tam
Modified: 2014-03-29 23:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screencast (529.44 KB, video/webm)
2013-02-01 03:46 UTC, Jean-François Fortin Tam
  Details
Window position patch (1.08 KB, patch)
2014-03-14 02:56 UTC, Georges Basile Stavracas Neto
none Details | Review
Utility positioning patch (1.58 KB, patch)
2014-03-18 15:37 UTC, Georges Basile Stavracas Neto
none Details | Review
Window position patch (1.09 KB, patch)
2014-03-18 15:46 UTC, Georges Basile Stavracas Neto
none Details | Review
Window position patch (1.72 KB, patch)
2014-03-19 02:11 UTC, Georges Basile Stavracas Neto
none Details | Review

Description Jean-François Fortin Tam 2013-02-01 03:46:49 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.
Comment 1 Owen Taylor 2014-03-13 21:37:57 UTC
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
Comment 2 Georges Basile Stavracas Neto 2014-03-14 02:56:31 UTC
Created attachment 271817 [details] [review]
Window position patch

This patch corrects loading and saving the window position.
Comment 3 Jean-François Fortin Tam 2014-03-14 18:53:09 UTC
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!
Comment 4 Georges Basile Stavracas Neto 2014-03-18 14:49:08 UTC
I'm not sure of that...
Pitivi still saves window positioning, and the headerbar branch also have this bug.
Comment 5 Georges Basile Stavracas Neto 2014-03-18 15:37:39 UTC
Created attachment 272287 [details] [review]
Utility positioning patch

This patch fixes the shifting behaviour of *utility* windows.
Comment 6 Georges Basile Stavracas Neto 2014-03-18 15:46:20 UTC
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.
Comment 7 Jean-François Fortin Tam 2014-03-19 02:08:48 UTC
Confirming that the 1st patch solves the problem, and the 2nd patch has no visible changes (it's a "theoretical" patch, but theoretically better)...
Comment 8 Georges Basile Stavracas Neto 2014-03-19 02:11:48 UTC
Created attachment 272349 [details] [review]
Window position patch

New patch with a comment explaining the use of get_position().
Comment 9 Jean-François Fortin Tam 2014-03-29 23:38:39 UTC
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! :)