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 602598 - WindowOverlay positions don't get updated when adding/removing workspaces in the overview
WindowOverlay positions don't get updated when adding/removing workspaces in ...
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2009-11-21 20:26 UTC by DELETED
Modified: 2009-12-18 16:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[workspaces] Reposition items at start of fade in (1.77 KB, patch)
2009-11-21 23:48 UTC, Colin Walters
needs-work Details | Review
Reposition items at start of fade in (4.63 KB, patch)
2009-11-22 13:05 UTC, Florian Müllner
accepted-commit_now Details | Review

Description DELETED 2009-11-21 20:26:12 UTC
This happens for instance when starting with the following setup of workspaces (notice that there is a space between the rows now):

[1] [2] [5]

[3] [4] [6]

and with at least one window on any of the workspaces 3,4 or 6. If now a new workspace ([7]) is added, the existing workspaces don't get scaled and 3, 4 and 6 slide upwards (as expected) and 7 slides in:

[1] [2] [5]
[3] [4] [6]
[7]

So far everything is fine. But when the window overlays are shown again, window overlays of the windows on 3, 4 and 6 are still at the same position on the screen as before, and thus they appear somewhere below the windows they belong to.
Comment 1 Colin Walters 2009-11-21 23:48:28 UTC
Created attachment 148252 [details] [review]
[workspaces] Reposition items at start of fade in

We need to be set the positions after the animation ends (and
fadeIn starts), not before when allocation is changed.
Comment 2 Florian Müllner 2009-11-22 01:06:00 UTC
Review of attachment 148252 [details] [review]:

Seems simple enough and certainly improves the current behavior - but the positioning still is not quite right (at least on my netbook). It might be worth resurrecting some code from Workspace and do the positioning there - I can look into it, so you can keep on working on some search-sugar

::: js/ui/workspaces.js
@@ +373,2 @@
     fadeIn: function() {
+        this._positionItems();

fadeIn() is called from a Tween onComplete handler, which may be run before completion ...

@@ +396,3 @@
 
+        let [x, y] = this._windowClone.actor.get_transformed_position();
+        let [w, h] = this._windowClone.actor.get_transformed_size();

... so size and position may be different from the ones the window ends up with.
Comment 3 Florian Müllner 2009-11-22 13:05:31 UTC
Created attachment 148261 [details] [review]
Reposition items at start of fade in

We need to set the positions after the animation ends (and
fadeIn starts), not before when allocation is changed.

As the window may still be in motion when the overlay is
repositioned, it is safer to pass the calculated values
as parameters.
Comment 4 Colin Walters 2009-11-24 20:35:05 UTC
Review of attachment 148261 [details] [review]:

Looks right.  Though I wonder if we could have a state machine to handle out of order onComplete callbacks, and then just one callback which calls others when everything's settled down.  But this seems fine for now.
Comment 5 Colin Walters 2009-11-24 20:36:57 UTC
Review of attachment 148261 [details] [review]:

Looks right.  Though I wonder if we could have a state machine to handle out of order onComplete callbacks, and then just one callback which calls others when everything's settled down.  But this seems fine for now.
Comment 6 Colin Walters 2009-12-18 16:28:03 UTC
pushed