quickshift-redux icon indicating copy to clipboard operation
quickshift-redux copied to clipboard

Cannot move tabs through Chrome windows that were launched as apps

Open heisencoder opened this issue 5 years ago • 1 comments

In my set-up, I have two regular Chrome windows (left and right side) that I want to move tabs between. However, I also launch a couple windows as "Apps", with the tab bar and URL bar hidden. I do this by running commands like this:

/usr/bin/google-chrome --app=https://chat.google.com

However, when I have an app window open, the move-tabs-between-windows command fails to work when it would shift the tab into the app window.

A proposed fix would be to skip over the window if the type property is set to "popup" instead of "normal". Here's a sample:

   case "move-tabs-between-windows":
       ...
          chrome.windows.getCurrent(
            function (currentWindow) {
              let currentWindowIndex = windows.map(window => window.id).indexOf(currentWindow.id)
              let nextWindowIndex = currentWindowIndex;
              let nextWindow = null;
              do {
                nextWindowIndex++;
                if (nextWindowIndex >= windows.length) nextWindowIndex = 0;
                nextWindow = windows[nextWindowIndex];
              } while (nextWindow.type != "normal" && nextWindowIndex != currentWindowIndex);

heisencoder avatar Oct 13 '20 18:10 heisencoder

Pull request available with the fix. I tested this locally and confirmed that it works.

heisencoder avatar Oct 15 '20 17:10 heisencoder