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 694469 - Overview – thumbnails sometimes swap places
Overview – thumbnails sometimes swap places
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: overview
3.7.x
Other Linux
: Normal minor
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
3.8
: 694961 696344 697906 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-02-22 18:25 UTC by Mantas Mikulėnas (grawity)
Modified: 2015-01-19 21:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
overview: Move the group construction to the controls manager (9.56 KB, patch)
2013-04-02 04:53 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
workspace: Use Workspace.WindowPositionFlags.NONE in another case (892 bytes, patch)
2013-04-02 04:53 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
workspace: Don't save the current layout (3.41 KB, patch)
2013-04-02 04:54 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
workspace: Make positionWindows private (2.92 KB, patch)
2013-04-02 04:54 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
workspace: Remove more dead code (1.10 KB, patch)
2013-04-02 04:54 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
workspace: Only create one strategy (1.31 KB, patch)
2013-04-02 04:54 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
workspace: Abort relayouting much earlier (2.23 KB, patch)
2013-04-02 04:54 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
workspace: Do window slot computing in three steps (1.73 KB, patch)
2013-04-02 04:54 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
workspacesView: Fix indentation (943 bytes, patch)
2013-04-02 04:54 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
workspacesView: Minor cleanup (1.27 KB, patch)
2013-04-02 04:54 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
workspacesView: Make setGeometry take a rectangle (4.44 KB, patch)
2013-04-02 04:54 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
workspacesView: Calculate the workspaces geometry ourselves (4.57 KB, patch)
2013-04-02 04:54 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
workspace: Make room for a second geometry to keep track of (9.74 KB, patch)
2013-04-02 04:54 UTC, Jasper St. Pierre (not reading bugmail)
accepted-commit_now Details | Review
workspace: Separate out spacing/padding code (2.02 KB, patch)
2013-04-02 04:54 UTC, Jasper St. Pierre (not reading bugmail)
accepted-commit_now Details | Review
workspace: Calculate the window slots when we reposition (2.29 KB, patch)
2013-04-02 04:54 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
workspace: Split out window repositioning logic and rename (3.89 KB, patch)
2013-04-02 04:54 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
workspace: Lay out windows based on the real allocation (7.25 KB, patch)
2013-04-02 04:54 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
overviewControls: Don't respect alwaysZoomOut in getVisibleWidth (969 bytes, patch)
2013-04-20 12:37 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
workspacesView: Calculate the workspaces geometry ourselves (4.57 KB, patch)
2013-04-20 12:37 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
workspace: Make room for a second geometry to keep track of (9.74 KB, patch)
2013-04-20 12:37 UTC, Jasper St. Pierre (not reading bugmail)
accepted-commit_now Details | Review
workspace: Separate out spacing/padding code (2.02 KB, patch)
2013-04-20 12:37 UTC, Jasper St. Pierre (not reading bugmail)
accepted-commit_now Details | Review
workspace: Calculate the window slots when we reposition (2.38 KB, patch)
2013-04-20 12:37 UTC, Jasper St. Pierre (not reading bugmail)
accepted-commit_now Details | Review
workspace: Split out window repositioning logic and rename (4.08 KB, patch)
2013-04-20 12:37 UTC, Jasper St. Pierre (not reading bugmail)
accepted-commit_now Details | Review
workspace: Lay out windows based on the real allocation (7.27 KB, patch)
2013-04-20 12:38 UTC, Jasper St. Pierre (not reading bugmail)
accepted-commit_now Details | Review
overviewControls: Add an accessor for the visible-width property (1.81 KB, patch)
2013-04-20 19:41 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
workspacesView: Calculate the workspaces geometry ourselves (4.57 KB, patch)
2013-04-20 19:41 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
workspace: Make room for a second geometry to keep track of (9.74 KB, patch)
2013-04-20 19:41 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
workspace: Separate out spacing/padding code (2.02 KB, patch)
2013-04-20 19:41 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
workspace: Calculate the window slots when we reposition (2.38 KB, patch)
2013-04-20 19:41 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
workspace: Split out window repositioning logic and rename (4.08 KB, patch)
2013-04-20 19:41 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
workspace: Lay out windows based on the real allocation (7.36 KB, patch)
2013-04-20 19:41 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Mantas Mikulėnas (grawity) 2013-02-22 18:25:29 UTC
The window thumbnails in the overview sometimes swap places when the thumbnail area width changes (e.g. when the workspace list is expanded).

This might be related to the new overview sort algorithm... which otherwise is a huge improvement, by the way.

If it's relevant, the screen is 1366x768; using gnome-shell 3.7.90-27-g6fcc7e3.

To reproduce:

1) Remove all workspaces but the first one.

2) Position three windows like this.

   ├─────────screen width──────────┤

   ....┌───────────────────────┐....   ┬
   ....│                       │....   │
   ┌─────────────┐   ┌─────────────┐   │
   │             │   │             │   │
   │      1      │   │      2      │   │
   │             │   │             │   │
   │             │ 3 │             │   │
   └─────────────┘   └─────────────┘   │
   ....│                       │....   │
   ....└───────────────────────┘....   ┴

3) Open the overview. The workspace list will be collapsed, and the window thumbnails will be shown like this:

             ┌───────┐
             │   1   │
             │       │
             └───────┘

                  ┌─────────┐
      ┌───────┐   │         │
      │   2   │   │         │
      │       │   │    3    │
      └───────┘   └─────────┘

3) Mouse-over the workspace list, to expand it.

Expected results: The workspace list expands, nothing else happens.

Actual results: The workspace list expands, and the window thumbnails #2 and #3 swap places:

             ┌───────┐
             │   1   │
             │       │
             └───────┘

      ┌─────────┐           
      │         │   ┌───────┐
      │         │   │   2   │
      │    3    │   │       │
      └─────────┘   └───────┘

When the workspace list closes, the thumbnails swap back to their original places.
Comment 1 drago01 2013-03-02 08:38:21 UTC
*** Bug 694961 has been marked as a duplicate of this bug. ***
Comment 2 Florian Müllner 2013-03-21 23:13:56 UTC
*** Bug 696344 has been marked as a duplicate of this bug. ***
Comment 3 Jasper St. Pierre (not reading bugmail) 2013-03-27 13:53:50 UTC
I have a giant set of patches for this, but they're probably more 3.10 material. It's a decently hard bug to fix.
Comment 4 Jasper St. Pierre (not reading bugmail) 2013-04-02 04:24:08 UTC
Not happening for 3.8.1, unless we want to push a scary number of patches for it. I'll attach the patch series soon.
Comment 5 Jasper St. Pierre (not reading bugmail) 2013-04-02 04:53:56 UTC
Created attachment 240343 [details] [review]
overview: Move the group construction to the controls manager

Instead of creating a bunch of random actors and then passing
them off to the controls manager, let the controls manager
construct them. This leaves the controls manager in charge
of the ordeal.
Comment 6 Jasper St. Pierre (not reading bugmail) 2013-04-02 04:53:59 UTC
Created attachment 240344 [details] [review]
workspace: Use Workspace.WindowPositionFlags.NONE in another case
Comment 7 Jasper St. Pierre (not reading bugmail) 2013-04-02 04:54:02 UTC
Created attachment 240345 [details] [review]
workspace: Don't save the current layout

This was saved so that doing something which called relayout
but only changed the area rectangle would simply be needed to
recompute window scaling parameters. With the new overview
relayout, the flow control changed, it turns out that the
current layout is always cleared. Remove this for now, and we'll
put in a different strategy for this.
Comment 8 Jasper St. Pierre (not reading bugmail) 2013-04-02 04:54:06 UTC
Created attachment 240346 [details] [review]
workspace: Make positionWindows private

It's not used outside, and it's going to be broken up soon.
Comment 9 Jasper St. Pierre (not reading bugmail) 2013-04-02 04:54:09 UTC
Created attachment 240347 [details] [review]
workspace: Remove more dead code

By the time zoomToOverview is called, an animation will
always be in progress.
Comment 10 Jasper St. Pierre (not reading bugmail) 2013-04-02 04:54:13 UTC
Created attachment 240348 [details] [review]
workspace: Only create one strategy

Now that we don't have any other strategies but the unaligned
one, we only need to construct it once.
Comment 11 Jasper St. Pierre (not reading bugmail) 2013-04-02 04:54:17 UTC
Created attachment 240349 [details] [review]
workspace: Abort relayouting much earlier

This means that the code for computeAllWindowSlots is a bit
cleaner, which will help in the future.
Comment 12 Jasper St. Pierre (not reading bugmail) 2013-04-02 04:54:21 UTC
Created attachment 240350 [details] [review]
workspace: Do window slot computing in three steps

This ensures that we have the correct Y value when sorting
windows.
Comment 13 Jasper St. Pierre (not reading bugmail) 2013-04-02 04:54:26 UTC
Created attachment 240351 [details] [review]
workspacesView: Fix indentation
Comment 14 Jasper St. Pierre (not reading bugmail) 2013-04-02 04:54:29 UTC
Created attachment 240352 [details] [review]
workspacesView: Minor cleanup
Comment 15 Jasper St. Pierre (not reading bugmail) 2013-04-02 04:54:33 UTC
Created attachment 240353 [details] [review]
workspacesView: Make setGeometry take a rectangle

This cleanup will be more important in the future,
but for now, we can simply pass a monitor.
Comment 16 Jasper St. Pierre (not reading bugmail) 2013-04-02 04:54:37 UTC
Created attachment 240354 [details] [review]
workspacesView: Calculate the workspaces geometry ourselves

To ensure that we don't recalculate window layouts when zooming
in or out, we need to always pass the full geometry. This will
break window repositioning when we zoom back in; for the purposes
of commit clarity, this breaks this feature for now. It will be
added back soon.
Comment 17 Jasper St. Pierre (not reading bugmail) 2013-04-02 04:54:41 UTC
Created attachment 240355 [details] [review]
workspace: Make room for a second geometry to keep track of

As we want to eventually track two geometries, we need to rename
our very plain "_x, _y, _width, _height". While we could just prefix
them, I think that stuffing them in an object makes more sense.

At the same time, make the variable and method name more descriptive
by adding such a prefix, as well as a bit of documentation.
Comment 18 Jasper St. Pierre (not reading bugmail) 2013-04-02 04:54:46 UTC
Created attachment 240356 [details] [review]
workspace: Separate out spacing/padding code

This will be used when we introduce the second geometry.
Comment 19 Jasper St. Pierre (not reading bugmail) 2013-04-02 04:54:50 UTC
Created attachment 240357 [details] [review]
workspace: Calculate the window slots when we reposition

Repositioning will eventually be separated from recalculation
to accomodate two different geometries,
Comment 20 Jasper St. Pierre (not reading bugmail) 2013-04-02 04:54:54 UTC
Created attachment 240358 [details] [review]
workspace: Split out window repositioning logic and rename

Split out the part that moves the window clones around from
the part that calculates the window clone positions, and rename
both methods so that the overall meaning is more clear.
Comment 21 Jasper St. Pierre (not reading bugmail) 2013-04-02 04:54:57 UTC
Created attachment 240359 [details] [review]
workspace: Lay out windows based on the real allocation

Instead of doing an entire recalculation of window positions when
sliding the thumbnails box, simply recalculate the position and scale
with basic aspect ratio math. This also ensures that windows won't
miraculously swap positions, even if we reposition windows while the
thumbnails box is expanded.
Comment 22 Jasper St. Pierre (not reading bugmail) 2013-04-12 19:38:00 UTC
*** Bug 697906 has been marked as a duplicate of this bug. ***
Comment 23 Cosimo Cecchi 2013-04-20 02:37:45 UTC
Review of attachment 240343 [details] [review]:

Looks good to me.
Comment 24 Cosimo Cecchi 2013-04-20 02:37:54 UTC
Review of attachment 240344 [details] [review]:

Sure
Comment 25 Cosimo Cecchi 2013-04-20 02:38:03 UTC
Review of attachment 240345 [details] [review]:

++
Comment 26 Cosimo Cecchi 2013-04-20 02:38:11 UTC
Review of attachment 240346 [details] [review]:

++
Comment 27 Cosimo Cecchi 2013-04-20 02:38:19 UTC
Review of attachment 240347 [details] [review]:

++
Comment 28 Cosimo Cecchi 2013-04-20 02:38:28 UTC
Review of attachment 240348 [details] [review]:

++
Comment 29 Cosimo Cecchi 2013-04-20 02:38:40 UTC
Review of attachment 240349 [details] [review]:

::: js/ui/workspace.js
@@ +1015,2 @@
         let clones = this._windows.slice();
+        if (clones.length === 0)

Why === matters here?

@@ +1520,3 @@
+        // All of the overlays have the same chrome sizes,
+        // so just pick the first one.
+        let overlay = this._windowOverlays[0];

You're assuming this._windows and this._windowOverlays have the same number of elements here, right?
Comment 30 Cosimo Cecchi 2013-04-20 02:38:49 UTC
Review of attachment 240350 [details] [review]:

Looks good
Comment 31 Cosimo Cecchi 2013-04-20 02:38:57 UTC
Review of attachment 240351 [details] [review]:

++
Comment 32 Cosimo Cecchi 2013-04-20 02:39:05 UTC
Review of attachment 240352 [details] [review]:

++
Comment 33 Cosimo Cecchi 2013-04-20 02:39:30 UTC
Review of attachment 240353 [details] [review]:

OK
Comment 34 Cosimo Cecchi 2013-04-20 02:40:17 UTC
Review of attachment 240354 [details] [review]:

::: js/ui/overviewControls.js
@@ +544,3 @@
+        let spacing = this.actor.get_theme_node().get_length('spacing');
+        let dashWidth = this._dashSlider.getVisibleWidth() + spacing;
+        let thumbnailsWidth = this._thumbnailsSlider.getVisibleWidth() + spacing;

getVisibleWidth() for the ThumbnailsSlider actually respects the alwaysZoomOut() policy as far as I can see; are you sure this really does what you want?
Comment 35 Cosimo Cecchi 2013-04-20 02:40:29 UTC
Review of attachment 240355 [details] [review]:

++
Comment 36 Cosimo Cecchi 2013-04-20 02:40:37 UTC
Review of attachment 240356 [details] [review]:

Sure
Comment 37 Cosimo Cecchi 2013-04-20 02:43:00 UTC
Review of attachment 240357 [details] [review]:

OK

::: js/ui/workspace.js
@@ +1040,3 @@
         let animate = flags & WindowPositionFlags.ANIMATE;
 
+        let layout = this._currentLayout;

Didn't you remove this._currentLayout in a previous patch?
You re-introduce it later though, so maybe this should be part of another patch.
Comment 38 Cosimo Cecchi 2013-04-20 02:43:35 UTC
Review of attachment 240358 [details] [review]:

::: js/ui/workspace.js
@@ +1037,3 @@
             clones.push(this._reservedSlot);
 
+        this._currentLayout = this._computeLayout(clones);

Shouldn't this be part of a different patch as well?
Comment 39 Cosimo Cecchi 2013-04-20 02:44:00 UTC
Review of attachment 240359 [details] [review]:

::: js/ui/workspace.js
@@ +924,3 @@
 
+        // The actual geometry is the geometry we need to arrange windows
+        // in. If this is less than the full geometry, we'll simply do

Nitpick: comment should probably say "if the area is smaller than" instead of "this is less than".

::: js/ui/workspacesView.js
@@ +58,2 @@
         this._fullGeometry = null;
+        this._actualGeometry = null;

I feel like you don't really need to store this state here; the rectEqual check is the only place this._actualGeometry is used, and it could be moved down to Workspace instead (on the other hand if you did this to keep the fullGeometry and actualGeometry code paths consistent, it's probably worth keeping it this way).
Comment 40 Jasper St. Pierre (not reading bugmail) 2013-04-20 12:34:40 UTC
Attachment 240343 [details] pushed as 8772edc - overview: Move the group construction to the controls manager
Attachment 240344 [details] pushed as d7c377c - workspace: Use Workspace.WindowPositionFlags.NONE in another case
Attachment 240345 [details] pushed as e981cae - workspace: Don't save the current layout
Attachment 240346 [details] pushed as 7e5d8a8 - workspace: Make positionWindows private
Attachment 240347 [details] pushed as ada70dd - workspace: Remove more dead code
Attachment 240348 [details] pushed as b41902f - workspace: Only create one strategy
Attachment 240349 [details] pushed as 1dac4d0 - workspace: Abort relayouting much earlier
Attachment 240350 [details] pushed as caaac9b - workspace: Do window slot computing in three steps
Attachment 240351 [details] pushed as 7cb1201 - workspacesView: Fix indentation
Attachment 240352 [details] pushed as 2506673 - workspacesView: Minor cleanup
Attachment 240353 [details] pushed as e3957f3 - workspacesView: Make setGeometry take a rectangle


Pushing these for now.

(In reply to comment #29)
> Review of attachment 240349 [details] [review]:
> 
> ::: js/ui/workspace.js
> @@ +1015,2 @@
>          let clones = this._windows.slice();
> +        if (clones.length === 0)
> 
> Why === matters here?

It doesn't. It was just a habit I picked up in my web developer world.
Removed.

> @@ +1520,3 @@
> +        // All of the overlays have the same chrome sizes,
> +        // so just pick the first one.
> +        let overlay = this._windowOverlays[0];
> 
> You're assuming this._windows and this._windowOverlays have the same number of
> elements here, right?

As far as I can tell, that should always be the case -- items are added
and removed at the same time.
Comment 41 Jasper St. Pierre (not reading bugmail) 2013-04-20 12:37:34 UTC
Created attachment 241988 [details] [review]
overviewControls: Don't respect alwaysZoomOut in getVisibleWidth

The slide will already take care of this, so it doesn't seem
necessary to me.
Comment 42 Jasper St. Pierre (not reading bugmail) 2013-04-20 12:37:38 UTC
Created attachment 241989 [details] [review]
workspacesView: Calculate the workspaces geometry ourselves

To ensure that we don't recalculate window layouts when zooming
in or out, we need to always pass the full geometry. This will
break window repositioning when we zoom back in; for the purposes
of commit clarity, this breaks this feature for now. It will be
added back soon.
Comment 43 Jasper St. Pierre (not reading bugmail) 2013-04-20 12:37:43 UTC
Created attachment 241990 [details] [review]
workspace: Make room for a second geometry to keep track of

As we want to eventually track two geometries, we need to rename
our very plain "_x, _y, _width, _height". While we could just prefix
them, I think that stuffing them in an object makes more sense.

At the same time, make the variable and method name more descriptive
by adding such a prefix, as well as a bit of documentation.
Comment 44 Jasper St. Pierre (not reading bugmail) 2013-04-20 12:37:47 UTC
Created attachment 241991 [details] [review]
workspace: Separate out spacing/padding code

This will be used when we introduce the second geometry.
Comment 45 Jasper St. Pierre (not reading bugmail) 2013-04-20 12:37:52 UTC
Created attachment 241992 [details] [review]
workspace: Calculate the window slots when we reposition

Repositioning will eventually be separated from recalculation
to accomodate two different geometries, so we'll need to do
the padding and area manipulation in two different areas.
Comment 46 Jasper St. Pierre (not reading bugmail) 2013-04-20 12:37:56 UTC
Created attachment 241993 [details] [review]
workspace: Split out window repositioning logic and rename

Split out the part that moves the window clones around from
the part that calculates the window clone positions, and rename
both methods so that the overall meaning is more clear.
Comment 47 Jasper St. Pierre (not reading bugmail) 2013-04-20 12:38:01 UTC
Created attachment 241994 [details] [review]
workspace: Lay out windows based on the real allocation

Instead of doing an entire recalculation of window positions when
sliding the thumbnails box, simply recalculate the position and scale
with basic aspect ratio math. This also ensures that windows won't
miraculously swap positions, even if we reposition windows while the
thumbnails box is expanded.
Comment 48 Jasper St. Pierre (not reading bugmail) 2013-04-20 12:41:18 UTC
currentLayout rebase blunders should be fixed.

(In reply to comment #39)
> Review of attachment 240359 [details] [review]:
> 
> ::: js/ui/workspace.js
> @@ +924,3 @@
> 
> +        // The actual geometry is the geometry we need to arrange windows
> +        // in. If this is less than the full geometry, we'll simply do
> 
> Nitpick: comment should probably say "if the area is smaller than" instead of
> "this is less than".

I forgot to fix it in the reattached patch here. Fixed locally.

> ::: js/ui/workspacesView.js
> @@ +58,2 @@
>          this._fullGeometry = null;
> +        this._actualGeometry = null;
> 
> I feel like you don't really need to store this state here; the rectEqual check
> is the only place this._actualGeometry is used, and it could be moved down to
> Workspace instead (on the other hand if you did this to keep the fullGeometry
> and actualGeometry code paths consistent, it's probably worth keeping it this
> way).

I indeed did this to make it consistent with fullGeometry.
Comment 49 Cosimo Cecchi 2013-04-20 15:20:52 UTC
Review of attachment 241988 [details] [review]:

I believe this would break the logic used by _getTranslation().
Comment 50 Cosimo Cecchi 2013-04-20 15:22:29 UTC
Review of attachment 241989 [details] [review]:

This looks okay, pending resolution of the previous patch.
Comment 51 Cosimo Cecchi 2013-04-20 15:24:59 UTC
Review of attachment 241990 [details] [review]:

Looks good.
Comment 52 Cosimo Cecchi 2013-04-20 15:25:43 UTC
Review of attachment 241991 [details] [review]:

Yep
Comment 53 Cosimo Cecchi 2013-04-20 15:28:22 UTC
Review of attachment 241992 [details] [review]:

Looks good
Comment 54 Cosimo Cecchi 2013-04-20 15:30:16 UTC
Review of attachment 241993 [details] [review]:

OK

::: js/ui/workspace.js
@@ +1037,3 @@
             clones.push(this._reservedSlot);
 
+        this._currentLayout = this._computeLayout(clones);

Can you initialize this to null in _init?
Comment 55 Cosimo Cecchi 2013-04-20 15:32:29 UTC
Review of attachment 241994 [details] [review]:

Did you mean "mysteriously" instead of "miraculously" in the commit message?
Patch looks good to me.
Comment 56 Jasper St. Pierre (not reading bugmail) 2013-04-20 19:41:04 UTC
Created attachment 242024 [details] [review]
overviewControls: Add an accessor for the visible-width property

To add a geometry that's independent of the slide factor of the workspace,
we need to get this from outside the sliding control.
Comment 57 Jasper St. Pierre (not reading bugmail) 2013-04-20 19:41:09 UTC
Created attachment 242025 [details] [review]
workspacesView: Calculate the workspaces geometry ourselves

To ensure that we don't recalculate window layouts when zooming
in or out, we need to always pass the full geometry. This will
break window repositioning when we zoom back in; for the purposes
of commit clarity, this breaks this feature for now. It will be
added back soon.
Comment 58 Jasper St. Pierre (not reading bugmail) 2013-04-20 19:41:13 UTC
Created attachment 242026 [details] [review]
workspace: Make room for a second geometry to keep track of

As we want to eventually track two geometries, we need to rename
our very plain "_x, _y, _width, _height". While we could just prefix
them, I think that stuffing them in an object makes more sense.

At the same time, make the variable and method name more descriptive
by adding such a prefix, as well as a bit of documentation.
Comment 59 Jasper St. Pierre (not reading bugmail) 2013-04-20 19:41:17 UTC
Created attachment 242027 [details] [review]
workspace: Separate out spacing/padding code

This will be used when we introduce the second geometry.
Comment 60 Jasper St. Pierre (not reading bugmail) 2013-04-20 19:41:22 UTC
Created attachment 242028 [details] [review]
workspace: Calculate the window slots when we reposition

Repositioning will eventually be separated from recalculation
to accomodate two different geometries, so we'll need to do
the padding and area manipulation in two different areas.
Comment 61 Jasper St. Pierre (not reading bugmail) 2013-04-20 19:41:27 UTC
Created attachment 242029 [details] [review]
workspace: Split out window repositioning logic and rename

Split out the part that moves the window clones around from
the part that calculates the window clone positions, and rename
both methods so that the overall meaning is more clear.
Comment 62 Jasper St. Pierre (not reading bugmail) 2013-04-20 19:41:32 UTC
Created attachment 242030 [details] [review]
workspace: Lay out windows based on the real allocation

Instead of doing an entire recalculation of window positions when
sliding the thumbnails box, simply recalculate the position and scale
with basic aspect ratio math. This also ensures that windows won't
miraculously swap positions, even if we reposition windows while the
thumbnails box is expanded.
Comment 63 Cosimo Cecchi 2013-04-21 18:49:53 UTC
Review of attachment 242024 [details] [review]:

Yes
Comment 64 Cosimo Cecchi 2013-04-21 18:50:04 UTC
Review of attachment 242025 [details] [review]:

Okay
Comment 65 Cosimo Cecchi 2013-04-21 18:50:15 UTC
Review of attachment 242026 [details] [review]:

Okay
Comment 66 Cosimo Cecchi 2013-04-21 18:50:26 UTC
Review of attachment 242027 [details] [review]:

Okay
Comment 67 Cosimo Cecchi 2013-04-21 18:50:36 UTC
Review of attachment 242028 [details] [review]:

Okay
Comment 68 Cosimo Cecchi 2013-04-21 18:50:47 UTC
Review of attachment 242029 [details] [review]:

Okay
Comment 69 Cosimo Cecchi 2013-04-21 18:50:58 UTC
Review of attachment 242030 [details] [review]:

::: js/ui/workspace.js
@@ +993,3 @@
             this._dropRect.set_size(geom.width, geom.height);
+            if (this._currentLayout != null)
+                this._updateWindowPositions(WindowPositionFlags.NONE);

Why do you this inside a Meta.later_add()?
Comment 70 Jasper St. Pierre (not reading bugmail) 2013-04-22 18:02:24 UTC
(In reply to comment #69)
> Review of attachment 242030 [details] [review]:
> 
> ::: js/ui/workspace.js
> @@ +993,3 @@
>              this._dropRect.set_size(geom.width, geom.height);
> +            if (this._currentLayout != null)
> +                this._updateWindowPositions(WindowPositionFlags.NONE);
> 
> Why do you this inside a Meta.later_add()?

Because setActualGeometry is called from notify::allocation, which means that we'll get allocation cycle warnings if we don't punt to an idle.

Effectively, what we eventually want is a layout manager instead of this, but that's a separate patch set.
Comment 71 Cosimo Cecchi 2013-04-22 18:40:55 UTC
Comment on attachment 241988 [details] [review]
overviewControls: Don't respect alwaysZoomOut in getVisibleWidth

This is obsolete
Comment 72 Cosimo Cecchi 2013-04-22 18:44:23 UTC
Review of attachment 242030 [details] [review]:

Sounds good then
Comment 73 Jasper St. Pierre (not reading bugmail) 2013-04-22 18:58:35 UTC
Attachment 242024 [details] pushed as fc53a25 - overviewControls: Add an accessor for the visible-width property
Attachment 242025 [details] pushed as f0c2ad0 - workspacesView: Calculate the workspaces geometry ourselves
Attachment 242026 [details] pushed as b925322 - workspace: Make room for a second geometry to keep track of
Attachment 242027 [details] pushed as 65eb5a3 - workspace: Separate out spacing/padding code
Attachment 242028 [details] pushed as 59ba550 - workspace: Calculate the window slots when we reposition
Attachment 242029 [details] pushed as bde8cc3 - workspace: Split out window repositioning logic and rename
Attachment 242030 [details] pushed as c37259b - workspace: Lay out windows based on the real allocation
Comment 74 Claudio Saavedra 2013-09-03 09:13:58 UTC
I can reproduce this with F19's 3.8 shell.
Comment 75 Baptiste Mille-Mathias 2013-09-05 18:55:21 UTC
Yep, it seems the problem came back (recently ?). I'm running gnome-shell-3.8.4-2.fc19.x86_64.

REOPENING
Comment 76 Jasper St. Pierre (not reading bugmail) 2013-09-05 18:58:12 UTC
Probably fixed by bug #707197