diff --git a/js/ui/search.js b/js/ui/search.js index 45ef42444..dd76735ce 100644 --- a/js/ui/search.js +++ b/js/ui/search.js @@ -422,10 +422,11 @@ var GridSearchResultsLayout = GObject.registerClass({ const [childWidth] = child.get_preferred_width(-1); const [childHeight] = child.get_preferred_height(-1); - childBox.set_size(childWidth, childHeight); - if (childBox.x1 + childWidth > width) - return; + if (childBox.x1 + childWidth <= width) + childBox.set_size(childWidth, childHeight); + else + childBox.set_size(0, 0); child.allocate(childBox); diff --git a/js/ui/userWidget.js b/js/ui/userWidget.js index 4e7277908..40bf59df9 100644 --- a/js/ui/userWidget.js +++ b/js/ui/userWidget.js @@ -152,17 +152,21 @@ class UserWidgetLabel extends St.Widget { let [, , natRealNameWidth] = this._realNameLabel.get_preferred_size(); - if (natRealNameWidth <= availWidth) + let childBox = new Clutter.ActorBox(); + + let hiddenLabel; + if (natRealNameWidth <= availWidth) { this._currentLabel = this._realNameLabel; - else + hiddenLabel = this._userNameLabel; + } else { this._currentLabel = this._userNameLabel; + hiddenLabel = this._realNameLabel; + } this.label_actor = this._currentLabel; - let childBox = new Clutter.ActorBox(); - childBox.x1 = 0; - childBox.y1 = 0; - childBox.x2 = availWidth; - childBox.y2 = availHeight; + hiddenLabel.allocate(childBox); + + childBox.set_size(availWidth, availHeight); this._currentLabel.allocate(childBox); } diff --git a/js/ui/workspace.js b/js/ui/workspace.js index ee7cbdc20..ee6e198b1 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -630,6 +630,14 @@ var WorkspaceLayout = GObject.registerClass({ if (windowInfo.currentTransition) { windowInfo.currentTransition.get_interval().set_final(childBox); + + // The timeline of the transition might not have been updated + // before this allocation cycle, so make sure the child + // still updates needs_allocation to FALSE. + // Unfortunately, this relies on the fast paths in + // clutter_actor_allocate(), otherwise we'd start a new + // transition on the child, replacing the current one. + child.allocate(child.allocation); continue; } diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js index 611bccfad..9d7a863ee 100644 --- a/js/ui/workspaceThumbnail.js +++ b/js/ui/workspaceThumbnail.js @@ -1270,6 +1270,9 @@ var ThumbnailsBox = GObject.registerClass({ let y = box.y1; if (this._dropPlaceholderPos == -1) { + this._dropPlaceholder.allocate_preferred_size( + ...this._dropPlaceholder.get_position()); + Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => { this._dropPlaceholder.hide(); });