Skip to content

Commit

Permalink
Gallery: restore the window first if it's minimzed.
Browse files Browse the repository at this point in the history
If we call show method when window is minimzed, the window flashes. To
prevent it, restore the window first before we show the window.

BUG=563322
TEST=manually tested as described in the issue.

Review URL: https://codereview.chromium.org/1494493002

Cr-Commit-Position: refs/heads/master@{#362656}
  • Loading branch information
yawano authored and Commit bot committed Dec 2, 2015
1 parent 7663ca2 commit 88176a2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/file_manager/gallery/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ function openGalleryWindow(urls) {
});
});
}).then(function(gallery) {
// If the window is minimized, we need to restore it first.
if (gallery.rawAppWindow.isMinimized())
gallery.rawAppWindow.restore();

gallery.rawAppWindow.show();

return gallery.rawAppWindow.contentWindow.appID;
}).catch(function(error) {
console.error('Launch failed' + error.stack || error);
Expand Down

0 comments on commit 88176a2

Please sign in to comment.