GNOME Bugzilla – Bug 697480
All windows of an app are displayed with Alt+tab
Last modified: 2017-06-05 20:07:10 UTC
Created attachment 240877 [details] [review] patch Hi, Step to reproduce: - open 2 or more instance (= windows) of an application (e.g.: gnome-terminal) - open an instance of an application (e.g: your internet browser) - do alt+tab and select an instance of the previously launched application (e.g: gnome-terminal) with the help of arrow keys - all instance of the selected application are displayed Expected behavior: Only the selected instance of the application should be displayed. This is what is done when selected an instance of an application with mouse.
Review of attachment 240877 [details] [review]: Thanks for the patch. It doesn't really work but clearly points the problem. I'll attach a working version.
Created attachment 240887 [details] [review] AppSwitcherPopup: Activate only the selected window if any If there's an explicitly selected window thumbnail we should bring up only that particular window instead of all the application's windows.
Review of attachment 240887 [details] [review]: OK.
I forgot to mention the following problem: if we do a fast alt-tab (ie just want to switch back to the previous application) all windows of the application are displayed. I think that gnome-shell should handle this case and display only the previous window.
(In reply to comment #4) > I forgot to mention the following problem: > if we do a fast alt-tab (ie just want to switch back to the previous > application) all windows of the application are displayed. > I think that gnome-shell should handle this case and display only the previous > window. Would it work in one way before a timeout and differently afterwards? That sounds very confusing. I think you probably want the window switcher instead. Attachment 240887 [details] pushed as 2499f2e - AppSwitcherPopup: Activate only the selected window if any
(In reply to comment #5) > Would it work in one way before a timeout and differently afterwards? > That sounds very confusing. Yes, but I find the current behavior confusing too. > I think you probably want the window switcher instead. Not really, I really like how alt+tab is handle in gnome-shell. I just have 2 use case: - quickly switch between 2 apps - switch to a selected app Of course, I could use 2 shortcuts to do that but in this case I think only one shortcut is better not only for me but for users too. Another solution is to lose the functionality of displaying all windows of an application. This will address the following questionable behavior: - open an application on workspace 1 (window 1) - open another instance of the same application on workspace 2 (window 2) - open a different application on workspace 1 (window 3) - open a different application on workspace 2 (window 4) So you have : - in workspace 1 the window 3 above window 1 - in workspace 2 the window 4 above window 2 If you go to workspace 1 and do a alt+tab to switch to window 1 you will end-up with: - in workspace 1 the window 1 above window 3 (ok no problem) - in workspace 2 the window 2 above window 4 (questionable) Maybe, we should stop pollute this bug report and continue this discussion on the list?
*** Bug 697971 has been marked as a duplicate of this bug. ***
Created attachment 352588 [details] [review] only raise first window with alt tab Alt+Tab still raises all windows of an app unless the user specifically picks a window. Switching between two windows in different apps (say a terminal and a text editor or web browser) is probably a significantly more frequent usage for Alt+Tab than switching to an application as a whole. This could be a regression since the previous patches on this bug were accepted. After looking at these patches and how various extensions attempt to solve the issue of Alt+Tab raising all windows (and break other things in the process), I created the following patch that creates the expected behavior without introducing other bugs (at least in my user testing at the office).
Comment on attachment 352588 [details] [review] only raise first window with alt tab (In reply to David Jordan from comment #8) > Alt+Tab still raises all windows of an app unless the user specifically > picks a window. Yes. The application switcher is meant to activate the application as a whole, which means raising all the windows. You may agree with that design, but that behavior is fully intentional. I really think what you want is: $ gsettings set org.gnome.desktop.wm.keybindings set switch-applications '[]' $ gsettings set org.gnome.desktop.wm.keybindings set switch-windows '["<Alt>Tab"]'
(In reply to Florian Müllner from comment #9) > Comment on attachment 352588 [details] [review] [review] > only raise first window with alt tab > > (In reply to David Jordan from comment #8) > > Alt+Tab still raises all windows of an app unless the user specifically > > picks a window. > > Yes. The application switcher is meant to activate the application as a > whole, which means raising all the windows. You may agree with that design, > but that behavior is fully intentional. > > I really think what you want is: > $ gsettings set org.gnome.desktop.wm.keybindings set switch-applications > '[]' > $ gsettings set org.gnome.desktop.wm.keybindings set switch-windows > '["<Alt>Tab"]' It may be intentional, but with the current behavior it's actually not possible to switch to (just) one window of another application without resorting to the arrow keys. Alt+~ only toggles between windows of the same application. The grouping by application is useful, and I'd rather adjust it to be more usable than simply send our users back to the old-style window switcher. Please take this as a good faith attempt to understand the design rationale, but can you think of why a user would want to switch to activate the application as a whole. So far this behavior has seemed to be more confusing/annoying than helpful in my testing, but I would like to understand it better before making decisions.
(In reply to David Jordan from comment #8) > Created attachment 352588 [details] [review] [review] > only raise first window with alt tab > > Alt+Tab still raises all windows of an app unless the user specifically > picks a window. Switching between two windows in different apps (say a > terminal and a text editor or web browser) is probably a significantly more > frequent usage for Alt+Tab than switching to an application as a whole. > > This could be a regression since the previous patches on this bug were > accepted. After looking at these patches and how various extensions attempt > to solve the issue of Alt+Tab raising all windows (and break other things in > the process), I created the following patch that creates the expected > behavior without introducing other bugs (at least in my user testing at the > office). This bug report has a misleading title and contains one bug and a questionable behavior: 1. the initial report was: when the user selects a specific instance of an application all windows of the application are raised. The expected behavior is: only raise the selected application. This bug was fixed by the patch provided by Rui Matos. 2. I also reported that when doing a "fast" alt+tab it should not bring all windows put only the previous one (ie the behavior you want). No patch was submitted for this problem because the behavior of the application switcher in 2013 and today is intentional (see comment #5 and comment #9). I tried a timer approach and as far as I remember it was not conclusive so I made the suggestion in comment #6. I wanted to continue the discussion on the list but I got no answer. To sum-up, if you want to go further I think you should in order of preference: - create a gnome extension with the desired behavior - create a new bug report but I think it will be marked as "not a bug" I also change the status of this bug to fixed as I think this bug report should only address 1.