PikeNote / taskbar-groups-pike-beta

Lightweight application that lets users create and pin groups to the Windows taskbar och desktop
MIT License
137 stars 9 forks source link

The window opened from clicking on a Taskbar Group doesn't open to the foreground #63

Open UndeadKitten opened 5 months ago

UndeadKitten commented 5 months ago

When clicking on the pinned taskbar group, it often doesn't open to the foreground for me, it opens behind other windows.

I think this is also causing another bug where after clicking the pinned taskbar group, and you decide not to open any of the shortcuts in the taskbar group window, so you click somewhere else, but the taskbar group window doesn't automatically close.

When testing the old tjackenpacken version I don't experience this issue.

Steps to recreate this issue (Windows 11):

  1. Run Taskbar.Groups.exe from D: drive
  2. Click "Add taskbar group"
  3. Drag 7 shortcuts into the taskbar group at once
  4. Change the name of the taskbar group
  5. Click "Save"
  6. Right click the newly created taskbar group to open the Shortcut folder in file explorer
  7. Right click the taskbar group and pin to taskbar
  8. Click on the taskbar group on the taskbar

Edit: changed a few words for clarity.

JohnLGalt commented 5 months ago

I've only noticed the second issue with QT-based apps (specifically KeePassXC). I always have to open another app after opening KPXC in order for the shortcut popup to go away. There may be one more app, but I have 10 shortcuts and probably 70 or more apps linked in those shortcuts, so I'll have to test every one of them to find the other.

As for windows opening behind other windows, I've seen this behavior since Windows 11 23H2, even from apps opened directly via the Run function as well as normal apps pinned directly to the taskbar. Sometimes if I open multiple instances, the second instance is in the foreground, but the initial is not. Other apps, though, open in the foreground perfectly fine. Still other apps never open in the foreground.

As the same apps do mostly the same things when I open than directly, I've attributed this to Windows' idiocy.

UndeadKitten commented 5 months ago

I only have this issue with taskbar-groups-pike-beta, the tjackenpacken/taskbar-groups doesn't have this issue for me, and I don't think I've experienced this with any other applications.

It happens very often but also inconsistently, on occasion it will function as desired; open to foreground and automatically close when clicking elsewhere. It seems like it is effected by what I last clicked on, whether it was the taskbar group itself, the taskbar it's on, a web browser, notepad, the desktop, etc.

Here is a video to show my issue:

https://github.com/PikeNote/taskbar-groups-pike-beta/assets/30302861/7fec1e63-97fb-4638-9fcd-0a43913a6a24

To describe what's happening in the video: I am clicking on a taskbar group that is pinned to my taskbar, the taskbar group window doesn't open to the foreground, I then click somewhere else to try and automatically close the taskbar group window, nothing happens, so I click on the taskbar group icon again to move the window to the foreground, then I click somewhere else again, the taskbar group window then automatically closes.

Also for clarity, my taskbar looks different from Windows 11's taskbar because I have StartAllBack installed. I tested the issue with the normal taskbar and I still get the same issue. I also still get the issue when using the taskbar group as a desktop icon instead of pinning it to the taskbar, here is a video showing that:

https://github.com/PikeNote/taskbar-groups-pike-beta/assets/30302861/1068f568-9ebe-4932-bddb-1b27c887983d

JohnLGalt commented 4 months ago

Well, I have seen it happen with numerous apps, both native Windows apps, like Notepad, as well as 3rd party apps, like HashCheck. Run it ans it immediately falls to behind the current window.

With Notepad, it's pretty much exactly like you describe - sometimes it pops up on screen on to of everything, and sometimes it just doesn't. And I've tried this with app running as admin as well as guaranteed all apps not running as admin, to rule that out.

I'll go through all the apps I've installed and then added to my 10 shortcuts, but I am sure there are at least a couple that do it just as randomly when opened via TBG Beta by Pike as well as when I run the m directly.

UndeadKitten commented 4 months ago

To clarify, this issue is not about the apps in the taskbar group not opening to foreground, I don't experience any issues there. My issue is with the little window that displays the group of apps that appears when you click on the pinned taskbar group, that little window often does not open to the foreground (as seen in previous videos).

There is evidently a difference with the taskbar-groups-pike-beta version that is causing this issue, as I don't experience this issue with the old tjackenpacken/taskbar-groups version.

Here are two additional videos showing the tjackenpacken/taskbar-groups version functioning as desired, consistently opening to the foreground and automatically closing when clicking elsewhere:

https://github.com/PikeNote/taskbar-groups-pike-beta/assets/30302861/c0355f7b-308c-43da-91ca-dc887e734691

https://github.com/PikeNote/taskbar-groups-pike-beta/assets/30302861/21862b21-2fd7-470c-acc2-cd4db0a2172d

Here are the earlier two videos showing the taskbar-groups-pike-beta version with the issue that I am describing, not opening to the foreground and not automatically closing when clicking elsewhere:

https://github.com/PikeNote/taskbar-groups-pike-beta/assets/30302861/7fec1e63-97fb-4638-9fcd-0a43913a6a24

https://github.com/PikeNote/taskbar-groups-pike-beta/assets/30302861/1068f568-9ebe-4932-bddb-1b27c887983d

JohnLGalt commented 4 months ago

OK, I see what you're saying now, but your earlier videos and the repostings of them in your last post shows me this:

Screenshot 2024-05-08 140157

The videos of the 'old' version work perfectly fine.

Sorry for misunderstanding what you were trying to say.

Question: Does killing Explorer.exe and restarting it (via Task Manager) resolve the issue? Also, I don't use StartAllBack, but does it have a service that continues to run in the background even when closed?

One thing I've noticed with this version from Pike, if I click a pinned TBG icon to show the group popup window and move my mouse really quickly to another area on the screen, if I am fast enough, the popup appears where my mouse pointer is actually at, instead of right above the taskbar. I discovered this quite by accident, and playd around with it - I can get as high as 2/3 of the way toward the top of the monitor before it pops up the group.

Also, as for the group view showing and then not going away, I have a variation of that issue every single day, multiple times a day, when opening one specific app (yes, it is not broken by just opening the group, but rather, after I click on one particular app) - specifically with KeePassXC. If I click on it's shortcut (and now symlink) to open the KPXC app, that group stays open indefinitely on the screen - until I either open another TBG group (and it takes 2 - 3 attempts to open another one) or else I open another app in that group - at which point it hides itself again.

UndeadKitten commented 4 months ago

Here is a reupload to YouTube, with all four videos in one, hopefully that's visible: https://www.youtube.com/watch?v=szWLN3-rRAs

If I recall correctly, I tried restarting explorer.exe and it didn't fix it. I checked Task Manager's Details and Services tabs and StartAllBack doesn't seem to run in the background, however it's .dll files are in use by explorer.exe. StartAllBack has an option to disable classic taskbar, and when doing so it restarts explorer.exe, but that didn't fix it either.

I might try uninstalling StartAllBack or testing taskbar-groups-pike-beta on my laptop(other pc) later, but if it were the cause then it's a bit strange that tjackenpacken/taskbar-groups works without the issue.

JohnLGalt commented 4 months ago

Interesting. (side note - visiting today does not give me the error regarding the videos your posted inline anymore, either - all 4 work fine - perhaps they were stuck in processing in GitHub....)

What version or Pike's TBG are you running? I'm currently running a pre-release 0.2.2.1 that Pike threw together to fix an issue I and others were previously having, from this post.

Another thought - I always have a tray icon of an app called Taskbar Groups Background running:

Screenshot 2024-05-09 144403

Do you ever see this at all? If so, can you confirm if the group popup only fails when this is not running?

UndeadKitten commented 4 months ago

I was running 0.2.2.0. I just gave 0.2.2.1 a try and the issue is still present. For both 0.2.2.0 and 0.2.2.1, the Taskbar Groups Background process is running and is in the system tray.

JohnLGalt commented 4 months ago

Odd. Is the TBG background process giving the same version as the application that you run?

If so, I'm out of ideas.

UndeadKitten commented 4 months ago

When running 0.2.2.0 exe, the background process version is 0.2.2.0.

I checked the 0.2.2.1 exe as well, and when switching version from 0.2.2.0 to 0.2.2.1, I made sure to delete and unpin the shortcuts from 0.2.2.0, ended the background process, deleted the Jack Schierbeck folder from AppData\Roaming, and deleted the old exe.

When running the 0.2.2.1 exe, the background process version is still 0.2.2.0.

JohnLGalt commented 4 months ago

OK, good. Then, the only thing I really see different would be explorer modifications and apps.

One thing you could possibly try for the sake of eliminating those would be to create a new temporary user and try it in there, without StartAllBack installed at all - but I suspect that will still manifest, if perhaps to a slightly lesser frequency, and nothing else.

As I mentioned, I see this happening with apps directly (Notepad and my Hash check apps are notorious for appearing behind windows already on the desktop).

If you pin the TBG shortcut to the start menu and use the Windows key shortcut (1-0) to open it does it still get stuck in the background (and thus unresponsive)?

UndeadKitten commented 4 months ago

I started up my old laptop which has a mostly fresh install of Windows 10, I have Open-Shell installed on my laptop, so I uninstalled Open-Shell, updated windows 10, then restarted it.

I tried pinning a taskbar group to the taskbar, same issue occurs. I tried adding the taskbar group to the desktop, same issue. Win+1-0 hotkey seems to open the shortcuts on my taskbar, not my start menu, on both Windows 10 & Windows 11. I tried this anyway on my laptop and the same issue occurs.

Also, my laptop is slower and takes longer to open applications, so I also experience the thing you mentioned where the small popup window appears where my mouse pointer is moved to, rather than directly above the taskbar group.

JohnLGalt commented 4 months ago

On the laptop. does it still fail if you install Open Shell back again? Also, in Task Manager, for the background running task - have you tried perhaps increasing its priority to higher than the default Normal value?

And, after having uninstalled OS on the laptop / StartAllBack on the main PC, creating a new user (which should have default settings across the board for all things related to the taskbar, versus potentially modified settings that were not reverted after uninstallation of either porogram) and seen if it works or not?

I suspect that it won't matter in a new user account, but it is a good check to make sure - and user accounts for testing are disposable, so no harm, no foul. But I think that this is a manifestation of the same thing that plagues other apps- because the popup is being handled by the background running TBG app, and it, itself, is the one that is failing to execute in the foreground, similarly as how I described more than a few actual apps are doing on all systems since 23H2.

Yours is just seemingly extreme in that it is happening all the time for this TBG instance, and seems to not be affected by the regular 0.2.2.0 versus the test 0.2.2.1.