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

enhancement: Show list of all windows (alt tab replacement) #298

Closed
onguarde opened this issue Sep 15, 2022 · 25 comments
Closed

enhancement: Show list of all windows (alt tab replacement) #298

onguarde opened this issue Sep 15, 2022 · 25 comments
Labels
enhancement New feature or request

Comments

@onguarde
Copy link

related to the enhancement request #231. Now we have a way to show a list of windows within a zone.

image

It would be great to also have a list for all windows as a completement to above feature.

  1. MRU list (alt tab order)
  2. Window list grouped by application.

When right clicked, it should close the window, like in #231.

With this, I can hide the taskbar, and not rely on it for window switching.

Do consider this enhancement! :)

@RamonUnch RamonUnch added the enhancement New feature or request label Sep 15, 2022
@RamonUnch
Copy link
Owner

This is easy to do indeed, However keep in mind that there already some very good Alt+Tab replacements around, Alt-Tab Terminator and DisplayFusion comes to my mind but for sure there are others.

Here is a build with the Windows List action. It list in the Alt+Tab order. It is not exactly the most recently used but rather the z-order of windows which is almost the same thing from a practical sense (this is what Alt+Tab does as well).

AltSnap1.57test19_x64.zip
AltSnap1.57test19_i386.zip

Note that you can setup a keyboard-only shortcut for the Windows List action but you cannot override the Alt+Tab system shortcur or any other system shortcuts.

@onguarde
Copy link
Author

This is simply awesome. I was using alt tab terminator, but a simple list accessible near the cursor, is much faster as a window switcher. Appreciate so much the work you have put in to enable this!

If you have many windows, the list starts getting too big to manage.
2022-09-23_18-54-59

I suggested earlier, "2. Window list grouped by application." feature, so we can quickly jump to a particular application in mind. Example, vscode windows. But we would have a list of 10+ windows up front, that's a lot of visual clutter.

Perhaps having a list of applications only, and subsequently showing the windows as a dropdown would be perfect.

  1. Explorer (5)
  2. Vscode (3)
  3. Todo
  4. Outlook

Eg. if we left click "1. Explorer (5)", it will show a list of all 5 windows in last created date order. Not z-order, to be aligned with how Windows taskbar shows it. Z-order, will be disorienting to the user in this case.

I believe with the above we can truly auto hide the taskbar in peace. Thanks so much again for the immense work!

@RamonUnch
Copy link
Owner

Some kind of per-application grouping is planed indeed.
perhaps a sub-menu as you suggest would be the best option.
This will not be for the next release though.

Eg. if we left click "1. Explorer (5)", it will show a list of all 5 windows in last created date order. Not z-order, to be aligned with how Windows taskbar shows it. Z-order, will be disorienting to the user in this case.

There is no way for me to know the creation order of windows, the only way would be to keep track of all windows creation/destruction all the time, like the taskbar does, but this would be a lot of coding and system intrusion that I am not willing to include in AltSnap.

BTW: I see that the numbered list goes up to 8 before counting with letters, it should actually go up to 9 before ABC..., I will fix that.

@onguarde
Copy link
Author

@RamonUnch i noticed the alt tab list, does not include minimised windows. Is this by design?

I did think about doing it this way. One list for minimised windows, another list for restored windows. Not sure how well that will work without testing. Currently, I put minimised windows into another virtual desktop, to avoid clutter so I can focus on a smaller working set of windows.

@RamonUnch
Copy link
Owner

The menu does indeed ignores minimized windows like the Alt+Tab scroll action.
Minimized windows should be shown on the menu indeed.

@RamonUnch
Copy link
Owner

Step by step improvement:
Here you will see minimized window too, the icon will be drawn with the text color so that it is clear that the window is minimized.

image

AltSnap1.57test21_i386.zip
AltSnap1.57test21_x64.zip

I think I will stop there with improvements for the next release, subsequent iterations will be after 1.57.

@Ichisich
Copy link

I set the Windows list to Win+Numblock(.) and it works like a charm.
One suggestion:
Let shift+number/letter/left click close the application.
Similar to native Alt+Tab, you could also allow middle click, instead of shift+left click, to close the application.

@onguarde
Copy link
Author

Great work. works nice. I like that the minimised windows appear at the bottom of the list.

The icon doesn't draw properly in black. Perhaps it's drawn enlarged.
image

I agree with middle clicking for closing, just to be consistent. Perhaps right clicking for raising the window, without closing the menu, this allows to cycle through the windows as a preview.

@onguarde
Copy link
Author

onguarde commented Sep 30, 2022

Found a bug when using this with VirtuaWin. (Virtual desktop manager).

The window list shows windows from ALL virtual desktops! This wasn't the case previously.

image

image

I'm sure it affects other Virtual desktop managers too. But we need to test.

@RamonUnch
Copy link
Owner

The system is responsible for drawing the icon in black, I agree it does not look good enough, I will just draw an additional line under the icon.

Only minimized windows appear across virtual desktops when I use VirtualWin4.5. I will investigate how he hides the windows. This should not affect the native Win10 virtual desktops because they use a specific flag to separate between different virtual desktops.

@RamonUnch
Copy link
Owner

@onguarde
Copy link
Author

onguarde commented Oct 1, 2022

Verified both issues are fixed in this version. Thanks so much. I'll use this as my default windows switcher, autohide the windows taskbar. Let's see how it goes.

@RamonUnch
Copy link
Owner

Let shift+number/letter/left click close the application.
Similar to native Alt+Tab, you could also allow middle click, instead of shift+left click, to close the application.

Nice indeed, for shift + click however, the menu will have to close, because windows menu have to close on a left click. Also Shift is not ideal, because on french based keymaps you already need to press shift to make numbers, so I think it will have to be Ctrl.

@RamonUnch
Copy link
Owner

Well unfortunately the accelerators are not sent when Ctrl is pressed so Ctrl+Key is not possible, however Shitf+Key will work only if you use alphabetic numbering. If you use numbers, the menu would receive keymap-dependent characters, because there are no uppercase numbers.
Also the middle mouse button will now behave like the right mouse button.
I am not sure this is the best idea, because the middle and right click could perform separate actions.

AltSnap1.57test24_x64.zip
AltSnap1.57test24_i386.zip

@Ichisich
Copy link

Ichisich commented Oct 1, 2022

Also the middle mouse button will now behave like the right mouse button.
I am not sure this is the best idea, because the middle and right click could perform separate actions.

Left = restore/focus | Middle = close | Right = minimize
That would be consistent with my general setup, so somewhat egocentrically inclined.

Or consider onguarde's recommendation to let right click do the same as left click, while keeping the menu open.

Well unfortunately the accelerators are not sent when Ctrl is pressed so Ctrl+Key is not possible, however Shitf+Key will work only if you use alphabetic numbering. If you use numbers, the menu would receive keymap-dependent characters, because there are no uppercase numbers.

I wasn't aware that the windows list isn't using virtual key codes.

@RamonUnch
Copy link
Owner

RamonUnch commented Oct 1, 2022

Well the message is WM_MENUCHAR and the parameters gives the character codes the good thing about it is that overall you get a more immersive experience and you can have accelerators in non-latin alphabet like Greek and Cyrillic. however it is not really designed for this kind of things. ie: key combo

I agree that minimizing would be the left button and middle button for closing is the best. Focusing the window without closing the menu would make it complicated because the menu would remain focused and this would lead to even more foreground war.

@Ichisich
Copy link

Ichisich commented Oct 1, 2022

In this case, I would scrab key combos altogether and concentrate on mouse handling.
Otherwise, it gets only inconsistent, especially on different keyboard layouts.

@RamonUnch RamonUnch mentioned this issue Oct 8, 2022
@mbartlett21
Copy link
Contributor

mbartlett21 commented Oct 24, 2022

Note that the taskbar works very well with click in titlebar to open the list. (The blank region of the taskbar after the app icons is in the titlebar with NCHITTEST)

EDIT: You also have to have the taskbar set to unlocked to get the primary taskbar to work.

image

@RamonUnch
Copy link
Owner

In theory you should just remove the |Shell_TrayWnd entry from the blacklist. so that actions can be performed on the taskbar.
Did not know that unlocking it would do the trick.

@mbartlett21
Copy link
Contributor

mbartlett21 commented Oct 24, 2022

@RamonUnch
I think the reason is that the taskbar sends back different values for NCHITTEST when it is locked or unlocked. (This could also be to do with using ExplorerPatcher to restore the win10 taskbar on win11)

When the taskbar is unlocked, for the region after the app icons it returns 2 for the NCHITTEST, but when it is locked it instead returns 1. (This is probably how you can drag the taskbar in that area when it is unlocked to move it to another edge of the screen)

With the filtering, it seems to only be the taskbar that is going different. (The alt+drag and the other actions (non-titlebar) that I have set up, they do correctly not do anything on the taskbar)

@fourteen-1
Copy link

In theory you should just remove the |Shell_TrayWnd entry from the blacklist. so that actions can be performed on the taskbar. Did not know that unlocking it would do the trick.

Hello,

I am using this feature as a mouse > title-bar > RMB (w/ hot-key (alt))

Removing |Shell_TrayWnd does not work.

The only way it works on the taskbar is by keeping it unlocked.

This feature is really good for using it on taskbar. I hope you are able to fix this issue so the taskbar does not have to remain unlocked.

Thanks.

@mbartlett21
Copy link
Contributor

This feature is really good for using it on taskbar. I hope you are able to fix this issue so the taskbar does not have to remain unlocked.

Unfortunately, this feature would be nigh on impossible to add without having to reimplement large parts of the windows taskbar, since AltSnap relies heavily on the NCHITTEST message.

Also, a side note: The Windows 11 taskbar is even worse. It replies to the NCHITTEST message saying that almost the whole taskbar (including the app icons on it) is classified as title, rather than just the empty sections of it like Windows 10 (and probably 7 and 8) do

@RamonUnch
Copy link
Owner

RamonUnch commented Nov 3, 2022

I am using this feature as a mouse > title-bar > RMB (w/ hot-key (alt))

The issue here is that you are using a titlebar action. Titlebar actions works inside titlebars only, even if you remove |Shell_TrayWnd from the blacklist the taskbar does not become a titlebar. Changing the locking flag does change it however.

I never really thought about this use case, there could be a specific option for this.

@RamonUnch
Copy link
Owner

You could use a ahk script that launches AltSnap.exe -apAltTabList when you middle click the |Shell_TrayWnd

@mbartlett21
Copy link
Contributor

I am using this feature as a mouse > title-bar > RMB (w/ hot-key (alt))

If you are using a hot-key for it, you could probably just set that option in the main AltSnap properties so that Alt+MMB on any window (not necessarily the titlebar) opens up that list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants