cairoshell / ManagedShell

A library for creating Windows shell replacements using .NET.
https://www.nuget.org/packages/ManagedShell/
Apache License 2.0
295 stars 25 forks source link

Minimizing windows still shows native non-explorer minimized window bar #108

Closed josephs-secureretail closed 3 months ago

josephs-secureretail commented 3 months ago

I am working on a custom kiosk launcher and using the TasksService to handle minimized windows, so that when a user minimizes a window, the program icon will appear along the bottom of the screen, and the user can then tap or click it to bring it back.

That part is working properly. However, when I minimize a window after the explorer shell has stopped running, the minimized windows are still showing up along the bottom of the screen as the built-in non-explorer minimized "bar":

Minimized window screenshot

The code I use to initialize the tasks service is as follows:

_tasksService = new TasksService(ManagedShell.Common.Enums.IconSize.Medium);
_tasks = new Tasks(_tasksService);
_tasks.Initialize();

/* Grab any existing minimized windows. */
MinimizedWindowList = new ObservableCollection<ApplicationWindow>();
UpdateMinimizedWindowList();

The "UpdateMinimizedWindowList" just pulls the current list of windows and then makes sure that all that are minimized are in the list I am storing of minimized windows, to display in the main window.

I am running windows 11 professional edition.

dremin commented 3 months ago

A couple things that should help:

josephs-secureretail commented 3 months ago

Awesome thanks, it seems like that has solved the issue. Funnily enough this only matters for my dev environment where I'm starting it with explorer running and my program is responsible for killing explorer. In production it uses the registry shell key so explorer never actually starts. Either way, it's easy enough to add a quick program restart after killing explorer.