Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deactivate current session when receiving a new tab #2284

Merged
merged 2 commits into from Nov 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -1245,6 +1245,7 @@ public void onTabsClose(ArrayList<Session> aTabs) {
@Override
public void onTabsReceived(@NotNull List<TabData> aTabs) {
WindowWidget targetWindow = mFocusedWindow;

boolean fullscreen = targetWindow.getSession().isInFullScreen();
for (int i = aTabs.size() - 1; i >= 0; --i) {
Session session = SessionStore.get().createSession(targetWindow.getSession().isPrivateMode());
Expand All @@ -1257,6 +1258,7 @@ public void onTabsReceived(@NotNull List<TabData> aTabs) {
if (i == 0 && !fullscreen) {
// Set the first received tab of the list the current one.
SessionStore.get().setActiveSession(session);
targetWindow.getSession().setActive(false);
targetWindow.setSession(session);
}
}
Expand Down