cosmicdan/TurboShell_old

Better "working window" detection/operation

Closed this issue · 0 comments

Right now, there is just one foreground window that is remembered for working on - whatever has the styles WS_VISIBLE and WS_CAPTION (as seen in WinEventHooks.WinEventHookThread#isWindowInteresting) just replaces the previous window handle. This behavior is obviously rudimentary and needs to be enhanced.

Initial plan:

  • Implement a LIFO stack for remembering the last n windows (doesn't need to be many, not sure if it's necessary to be configurable)
  • Remember every window, regardless of style
  • Update the state of sysbuttons (and any future "working window" manipulation controls) depending on whether they can operate on the foreground window. I.e. if the foreground window cannot be minimized, disable the minimize button.
    • Add an option to make the buttons operate on the previous window (on the stack) instead of disabling the sysbuttons completely. Probably should have a little visual indicator (a number?) to show that that particular sysmenu action will operate on the nth window back.