diff -Nru gnome-shell-extension-ubuntu-dock-68ubuntu20.10.1/appIcons.js gnome-shell-extension-ubuntu-dock-69ubuntu1/appIcons.js --- gnome-shell-extension-ubuntu-dock-68ubuntu20.10.1/appIcons.js 2020-09-10 23:47:20.000000000 +0000 +++ gnome-shell-extension-ubuntu-dock-69ubuntu1/appIcons.js 2021-03-26 07:01:34.000000000 +0000 @@ -45,7 +45,8 @@ PREVIEWS: 5, MINIMIZE_OR_PREVIEWS: 6, FOCUS_OR_PREVIEWS: 7, - QUIT: 8, + FOCUS_MINIMIZE_OR_PREVIEWS: 8, + QUIT: 9 }; const scrollAction = { @@ -458,6 +459,19 @@ } else { // Activate the first window let w = windows[0]; + Main.activateWindow(w); + } + break; + + case clickAction.FOCUS_MINIMIZE_OR_PREVIEWS: + if (this.app == focusedApp) { + if (windows.length > 1 || modifiers || button != 1) + this._windowPreviews(); + else if (!Main.overview.visible) + this._minimizeWindow(); + } else { + // Activate the first window + let w = windows[0]; Main.activateWindow(w); } break; diff -Nru gnome-shell-extension-ubuntu-dock-68ubuntu20.10.1/COPYING gnome-shell-extension-ubuntu-dock-69ubuntu1/COPYING --- gnome-shell-extension-ubuntu-dock-68ubuntu20.10.1/COPYING 2020-09-10 23:47:20.000000000 +0000 +++ gnome-shell-extension-ubuntu-dock-69ubuntu1/COPYING 2021-03-26 07:01:34.000000000 +0000 @@ -1,12 +1,12 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public @@ -15,7 +15,7 @@ General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not @@ -55,8 +55,8 @@ The precise terms and conditions for copying, distribution and modification follow. - - GNU GENERAL PUBLIC LICENSE + + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains @@ -110,7 +110,7 @@ License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -168,7 +168,7 @@ access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -225,7 +225,7 @@ This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -255,7 +255,7 @@ of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN @@ -277,9 +277,9 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it @@ -303,17 +303,16 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) year name of author + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -336,6 +335,5 @@ This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General +library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. - diff -Nru gnome-shell-extension-ubuntu-dock-68ubuntu20.10.1/dash.js gnome-shell-extension-ubuntu-dock-69ubuntu1/dash.js --- gnome-shell-extension-ubuntu-dock-68ubuntu20.10.1/dash.js 2020-09-10 23:47:20.000000000 +0000 +++ gnome-shell-extension-ubuntu-dock-69ubuntu1/dash.js 2021-03-26 07:01:34.000000000 +0000 @@ -86,7 +86,8 @@ let availWidth = contentBox.x2 - contentBox.x1; let availHeight = contentBox.y2 - contentBox.y1; - this.set_allocation(box); + Docking.DockManager.useNewAllocation ? + this.set_allocation(box) : this.set_allocation(box, flags); let [appIcons, showAppsButton] = this.get_children(); let [, showAppsNatHeight] = showAppsButton.get_preferred_height(availWidth); @@ -104,25 +105,29 @@ childBox.y1 = contentBox.y1 + offset_y; childBox.x2 = contentBox.x2; childBox.y2 = contentBox.y2; - appIcons.allocate(childBox); + Docking.DockManager.useNewAllocation ? + appIcons.allocate(childBox) : appIcons.allocate(childBox, flags); childBox.y1 = contentBox.y1; childBox.x1 = contentBox.x1; childBox.x2 = contentBox.x1 + showAppsNatWidth; childBox.y2 = contentBox.y1 + showAppsNatHeight; - showAppsButton.allocate(childBox); + Docking.DockManager.useNewAllocation ? + showAppsButton.allocate(childBox) : showAppsButton.allocate(childBox, flags); } else { childBox.x1 = contentBox.x1; childBox.y1 = contentBox.y1; childBox.x2 = contentBox.x2 - offset_x; childBox.y2 = contentBox.y2 - offset_y; - appIcons.allocate(childBox); + Docking.DockManager.useNewAllocation ? + appIcons.allocate(childBox) : appIcons.allocate(childBox, flags); childBox.x2 = contentBox.x2; childBox.y2 = contentBox.y2; childBox.x1 = contentBox.x2 - showAppsNatWidth; childBox.y1 = contentBox.y2 - showAppsNatHeight; - showAppsButton.allocate(childBox); + Docking.DockManager.useNewAllocation ? + showAppsButton.allocate(childBox) : showAppsButton.allocate(childBox, flags); } } diff -Nru gnome-shell-extension-ubuntu-dock-68ubuntu20.10.1/debian/changelog gnome-shell-extension-ubuntu-dock-69ubuntu1/debian/changelog --- gnome-shell-extension-ubuntu-dock-68ubuntu20.10.1/debian/changelog 2020-09-10 23:47:20.000000000 +0000 +++ gnome-shell-extension-ubuntu-dock-69ubuntu1/debian/changelog 2021-03-26 07:01:34.000000000 +0000 @@ -1,3 +1,46 @@ +gnome-shell-extension-ubuntu-dock (69ubuntu1) hirsute; urgency=medium + + [ Marco Trevisan (Treviño) ] + * appIcons: Set dependency on DBusmenu dynamic + * docking: Set the dash as the IconAnimator timeline actor + * Makefile: Include dbusmenuUtils.js + * docking: Replace anchor point with clutter translations + * docking: Disable the overview misplacement workaround + * docking: Make the overview visibleView code working in 3.38 + * dash, docking: Update allocation method calls signature to upstream + * DockManager: Make allocation code to work in both 3.38 and 3.36 + * metadata: Add 3.38 to supported versions + + [ Mike DePaulo ] + * Update to latest wording of the GPLv2 license + + [ UA27 ] + * Fix autohide glitches explainations + + [ Недко Николов ] + * Fix getWindows for a location in the dock + * Make sure that location doesn't end with a '/' + + [ Michele Gaio ] + * Bump version (v69). + * Revert "Fix #1232". + * Fix #1232 again. + + [ Jan Němec ] + * windowPreviews now scale properly + * windowPreviews are now properly Y-centered on horizontal docks + + [ l3nn4rt ] + * appIcons: Add 'Focus, minimize or show previews' + + [ Michael Suhodolov ] + * Fix flickering on show-apps (LP: #11919972) + + [ Ryan Hendrickson ] + * Do not animate disposed icons (LP: #1905519) + + -- Marco Trevisan (Treviño) Fri, 26 Mar 2021 08:01:34 +0100 + gnome-shell-extension-ubuntu-dock (68ubuntu20.10.1) groovy; urgency=medium [ Michele Gaio ] diff -Nru gnome-shell-extension-ubuntu-dock-68ubuntu20.10.1/docking.js gnome-shell-extension-ubuntu-dock-69ubuntu1/docking.js --- gnome-shell-extension-ubuntu-dock-68ubuntu20.10.1/docking.js 2020-09-10 23:47:20.000000000 +0000 +++ gnome-shell-extension-ubuntu-dock-69ubuntu1/docking.js 2021-03-26 07:01:34.000000000 +0000 @@ -31,6 +31,8 @@ const DOCK_DWELL_CHECK_INTERVAL = 100; +let USE_NEW_ALLOCATION; + var State = { HIDDEN: 0, SHOWING: 1, @@ -80,7 +82,9 @@ vfunc_allocate(box) { let contentBox = this.get_theme_node().get_content_box(box); - this.set_allocation(box); + + DockManager.useNewAllocation ? + this.set_allocation(box) : this.set_allocation(box, flags); if (this.child == null) return; @@ -116,7 +120,9 @@ childBox.y2 = slideoutSize + this._slidex * (childHeight - slideoutSize); } - this.child.allocate(childBox); + DockManager.useNewAllocation ? + this.child.allocate(childBox) : this.child.allocate(childBox, flags); + this.child.set_clip(-childBox.x1, -childBox.y1, -childBox.x1+availWidth, -childBox.y1 + availHeight); } @@ -659,11 +665,12 @@ this._ignoreHover = false; // Do not hide if autohide is enabled and mouse is hover if (!this._box.hover || !this._autohideIsEnabled) - this._hide(); + this._animateOut(settings.get_double('animation-time'), 0); } else { this._ignoreHover = true; - this._show(); + this._removeAnimations(); + this._animateIn(settings.get_double('animation-time'), 0); } } else { @@ -695,16 +702,16 @@ } _hoverChanged() { - // Skip if dock is not in autohide mode for instance because it is shown by intellihide or - // if the dock's `_ignoreHover` value is set to true. - if (this._ignoreHover || !this._autohideIsEnabled) { - return; + if (!this._ignoreHover) { + // Skip if dock is not in autohide mode for instance because it is shown + // by intellihide. + if (this._autohideIsEnabled) { + if (this._box.hover) + this._show(); + else + this._hide(); + } } - - if (this._triggerTimeoutId) - this._isPointerInZone() || this._box.hover ? this._show() : this._hide(); - else - this._box.hover ? this._show() : this._hide(); } getDockState() { @@ -712,9 +719,7 @@ } _show() { - // Remove any delayed hide animation. - delete this._delayedHide; - + this._delayedHide = false; if ((this._dockState == State.HIDDEN) || (this._dockState == State.HIDING)) { if (this._dockState == State.HIDING) // suppress all potential queued transitions - i.e. added but not started, @@ -747,6 +752,7 @@ _animateIn(time, delay) { this._dockState = State.SHOWING; this.dash.iconAnimator.start(); + this._delayedHide = false; this._slider.ease_property('slidex', 1, { duration: time * 1000, @@ -764,9 +770,7 @@ this._removeBarrierTimeoutId = GLib.timeout_add( GLib.PRIORITY_DEFAULT, 100, this._removeBarrier.bind(this)); } else { - // If an animate-out transition was delayed, check if - // it is still necessary. - this._hoverChanged(); + this._hide(); } } }); @@ -906,19 +910,26 @@ } /** - * Returns whether the global pointer is considered inside of the dock - * area or not. + * handler for mouse pressure sensed */ - _isPointerInZone() { - let [x, y, mods] = global.get_pointer(); + _onPressureSensed() { + if (Main.overview.visibleTarget) + return; + // In case the mouse move away from the dock area before hovering it, in such case the leave event + // would never be triggered and the dock would stay visible forever. + let triggerTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 250, () => { + triggerTimeoutId = 0; + + let [x, y, mods] = global.get_pointer(); + let shouldHide = true; switch (this._position) { case St.Side.LEFT: if (x <= this.staticBox.x2 && x >= this._monitor.x && y >= this._monitor.y && y <= this._monitor.y + this._monitor.height) { - return true; + shouldHide = false; } break; case St.Side.RIGHT: @@ -926,7 +937,7 @@ x <= this._monitor.x + this._monitor.width && y >= this._monitor.y && y <= this._monitor.y + this._monitor.height) { - return true; + shouldHide = false; } break; case St.Side.TOP: @@ -934,7 +945,7 @@ x <= this._monitor.x + this._monitor.width && y <= this.staticBox.y2 && y >= this._monitor.y) { - return true; + shouldHide = false; } break; case St.Side.BOTTOM: @@ -942,31 +953,17 @@ x <= this._monitor.x + this._monitor.width && y >= this.staticBox.y1 && y <= this._monitor.y + this._monitor.height) { - return true; + shouldHide = false; } - break; } - - return false; - } - - /** - * handler for mouse pressure sensed - */ - _onPressureSensed() { - if (Main.overview.visibleTarget) - return; - - // In case the mouse move away from the dock area before hovering it, in such case the leave event - // would never be triggered and the dock would stay visible forever. - this._triggerTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 250, () => { - if (!this._isPointerInZone()) { + if (shouldHide) { this._hoverChanged(); return GLib.SOURCE_REMOVE; } else { return GLib.SOURCE_CONTINUE; } + }); this._show(); @@ -1129,7 +1126,7 @@ this._signalsHandler.removeWithLabel('verticalOffsetChecker'); if (extendHeight) { - if (overviewControls && Main.overview.viewSelector.appDisplay._views) { + if (overviewControls && !DockManager.useNewAllocation) { // This is a workaround for bug #1007, only in versions before 3.38 this._signalsHandler.addWithLabel('verticalOffsetChecker', [ overviewControls.layout_manager, @@ -1657,6 +1654,18 @@ return DockManager.getDefault()._settings; } + static get useNewAllocation() { + /* Remove this when version prior to 3.38 are not supported anymore */ + if (USE_NEW_ALLOCATION === undefined) { + /* We only support 3.36 and 3.38 right now, so no much to check */ + USE_NEW_ALLOCATION = ExtensionUtils.versionCheck( + ['3.37.91', '3.37.92', '3.38'], + imports.misc.config.PACKAGE_VERSION); + } + + return USE_NEW_ALLOCATION; + } + get fm1Client() { return this._fm1Client; } @@ -1908,27 +1917,20 @@ this._forcedOverview = true; let grid = visibleView._grid; if (animate) { - // Animate in the the appview, hide the appGrid to avoiud flashing - // Go to the appView before entering the overview, skipping the workspaces. - // Do this manually avoiding opacity in transitions so that the setting of the opacity - // to 0 doesn't get overwritten. - Main.overview.viewSelector._activePage.opacity = 0; - Main.overview.viewSelector._activePage.hide(); - Main.overview.viewSelector._activePage = Main.overview.viewSelector._appsPage; - Main.overview.viewSelector._activePage.show(); - grid.opacity = 0; - // The animation has to be trigered manually because the AppDisplay.animate // method is waiting for an allocation not happening, as we skip the workspace view // and the appgrid could already be allocated from previous shown. // It has to be triggered after the overview is shown as wrong coordinates are obtained // otherwise. - let overviewShownId = Main.overview.connect('shown', () => { - Main.overview.disconnect(overviewShownId); - Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => { - grid.opacity = 255; - grid.animateSpring(IconGrid.AnimationDirection.IN, this.mainDock.dash.showAppsButton); - }); + + // There was another issue in gnome 3.38 causing flickering every time using the previous + // workaround. Because it is no longer needed, only the part that prevents it from freezing + // on first opening is used. + + Main.overview.viewSelector._activePage = Main.overview.viewSelector._appsPage; + Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => { + grid.opacity = 255; + grid.animateSpring(IconGrid.AnimationDirection.IN, this.mainDock.dash.showAppsButton); }); } else { @@ -2048,7 +2050,7 @@ const danceRotation = progress < 1/6 ? 15*Math.sin(progress*24*Math.PI) : 0; const dancers = this._animations.dance; for (let i = 0, iMax = dancers.length; i < iMax; i++) { - dancers[i].rotation_angle_z = danceRotation; + dancers[i].target.rotation_angle_z = danceRotation; } }); } @@ -2056,6 +2058,13 @@ destroy() { this._timeline.stop(); this._timeline = null; + for (const name in this._animations) { + const pairs = this._animations[name]; + for (let i = 0, iMax = pairs.length; i < iMax; i++) { + const pair = pairs[i]; + pair.target.disconnect(pair.targetDestroyId); + } + } this._animations = null; } @@ -2074,7 +2083,8 @@ } addAnimation(target, name) { - this._animations[name].push(target); + const targetDestroyId = target.connect('destroy', () => this.removeAnimation(target, name)); + this._animations[name].push({ target, targetDestroyId }); if (this._started && this._count === 0) { this._timeline.start(); } @@ -2082,12 +2092,17 @@ } removeAnimation(target, name) { - const index = this._animations[name].indexOf(target); - if (index >= 0) { - this._animations[name].splice(index, 1); - this._count--; - if (this._started && this._count === 0) { - this._timeline.stop(); + const pairs = this._animations[name]; + for (let i = 0, iMax = pairs.length; i < iMax; i++) { + const pair = pairs[i]; + if (pair.target === target) { + target.disconnect(pair.targetDestroyId); + pairs.splice(i, 1); + this._count--; + if (this._started && this._count === 0) { + this._timeline.stop(); + } + return; } } } diff -Nru gnome-shell-extension-ubuntu-dock-68ubuntu20.10.1/fileManager1API.js gnome-shell-extension-ubuntu-dock-69ubuntu1/fileManager1API.js --- gnome-shell-extension-ubuntu-dock-68ubuntu20.10.1/fileManager1API.js 2020-09-10 23:47:20.000000000 +0000 +++ gnome-shell-extension-ubuntu-dock-69ubuntu1/fileManager1API.js 2021-03-26 07:01:34.000000000 +0000 @@ -81,8 +81,14 @@ */ getWindows(location) { let ret = new Set(); + let locationEsc = location; + + if (!location.endsWith('/')) { + locationEsc += '/'; + } + for (let [k,v] of this._locationMap) { - if (k.startsWith(location)) { + if ((k + '/').startsWith(locationEsc)) { for (let l of v) { ret.add(l); } diff -Nru gnome-shell-extension-ubuntu-dock-68ubuntu20.10.1/metadata.json gnome-shell-extension-ubuntu-dock-69ubuntu1/metadata.json --- gnome-shell-extension-ubuntu-dock-68ubuntu20.10.1/metadata.json 2020-09-10 23:47:20.000000000 +0000 +++ gnome-shell-extension-ubuntu-dock-69ubuntu1/metadata.json 2021-03-26 07:01:34.000000000 +0000 @@ -9,5 +9,5 @@ "original-author": "micxgx@gmail.com", "url": "https://micheleg.github.io/dash-to-dock/", "gettext-domain": "dashtodock", -"version": 68 +"version": 69 } diff -Nru gnome-shell-extension-ubuntu-dock-68ubuntu20.10.1/schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml gnome-shell-extension-ubuntu-dock-69ubuntu1/schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml --- gnome-shell-extension-ubuntu-dock-68ubuntu20.10.1/schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml 2020-09-10 23:47:20.000000000 +0000 +++ gnome-shell-extension-ubuntu-dock-69ubuntu1/schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml 2021-03-26 07:01:34.000000000 +0000 @@ -9,7 +9,8 @@ - + + diff -Nru gnome-shell-extension-ubuntu-dock-68ubuntu20.10.1/Settings.ui gnome-shell-extension-ubuntu-dock-69ubuntu1/Settings.ui --- gnome-shell-extension-ubuntu-dock-68ubuntu20.10.1/Settings.ui 2020-09-10 23:47:20.000000000 +0000 +++ gnome-shell-extension-ubuntu-dock-69ubuntu1/Settings.ui 2021-03-26 07:01:34.000000000 +0000 @@ -86,6 +86,7 @@ Show window previews Minimize or show previews Focus or show previews + Focus, minimize or show previews Quit @@ -159,6 +160,7 @@ Show window previews Minimize or show previews Focus or show previews + Focus, minimize or show previews Quit @@ -232,6 +234,7 @@ Show window previews Minimize or show previews Focus or show previews + Focus, minimize or show previews Quit @@ -1693,6 +1696,7 @@ Show window previews Minimize or show previews Focus or show previews + Focus, minimize or show previews diff -Nru gnome-shell-extension-ubuntu-dock-68ubuntu20.10.1/windowPreview.js gnome-shell-extension-ubuntu-dock-69ubuntu1/windowPreview.js --- gnome-shell-extension-ubuntu-dock-68ubuntu20.10.1/windowPreview.js 2020-09-10 23:47:20.000000000 +0000 +++ gnome-shell-extension-ubuntu-dock-69ubuntu1/windowPreview.js 2021-03-26 07:01:34.000000000 +0000 @@ -320,13 +320,15 @@ this._window = window; this._destroyId = 0; this._windowAddedId = 0; + [this._width, this._height, this._scale] = this._getWindowPreviewSize(); // This gets the actual windows size for the preview // We don't want this: it adds spacing on the left of the item. this.remove_child(this._ornamentLabel); this.add_style_class_name('dashtodock-app-well-preview-menu-item'); + // Now we don't have to set PREVIEW_MAX_WIDTH and PREVIEW_MAX_HEIGHT as preview size - that made all kinds of windows either stretched or squished (aspect ratio problem) this._cloneBin = new St.Bin(); - this._cloneBin.set_size(PREVIEW_MAX_WIDTH, PREVIEW_MAX_HEIGHT); + this._cloneBin.set_size(this._width*this._scale, this._height*this._scale); // TODO: improve the way the closebutton is layout. Just use some padding // for the moment. @@ -343,7 +345,7 @@ this.closeButton.opacity = 0; this.closeButton.connect('clicked', this._closeWindow.bind(this)); - let overlayGroup = new Clutter.Actor({layout_manager: new Clutter.BinLayout() }); + let overlayGroup = new Clutter.Actor({layout_manager: new Clutter.BinLayout(), y_expand: true }); overlayGroup.add_actor(this._cloneBin); overlayGroup.add_actor(this.closeButton); @@ -370,6 +372,13 @@ this.connect('destroy', this._onDestroy.bind(this)); } + _getWindowPreviewSize() { + let mutterWindow = this._window.get_compositor_private(); + let [width, height] = mutterWindow.get_size(); + let scale = Math.min(1.0, PREVIEW_MAX_WIDTH/width, PREVIEW_MAX_HEIGHT/height); + return [width, height, scale]; + } + _cloneTexture(metaWin){ let mutterWindow = metaWin.get_compositor_private(); @@ -390,12 +399,10 @@ return; } - let [width, height] = mutterWindow.get_size(); - let scale = Math.min(1.0, PREVIEW_MAX_WIDTH/width, PREVIEW_MAX_HEIGHT/height); let clone = new Clutter.Clone ({ source: mutterWindow, reactive: true, - width: width * scale, - height: height * scale }); + width: this._width * this._scale, + height: this._height * this._scale }); // when the source actor is destroyed, i.e. the window closed, first destroy the clone // and then destroy the menu item (do this animating out) @@ -588,4 +595,4 @@ this._windowTitleId = 0; } } -}); +}); \ No newline at end of file