Marko19907 / OLEDShift

A small system tray utility that moves around the windows on the screen to prevent burn-in
BSD 3-Clause "New" or "Revised" License
14 stars 1 forks source link

Suggestion: Pre moving indicator #24

Open lucas-teks opened 3 weeks ago

lucas-teks commented 3 weeks ago

Hello, thanks for providing this tool!

Have you considered adding some sort of indicator / overlay / sound option to trigger few secs before the window moves? This is really frustrating when it switches ms before clicking on an action, for example when clicking on a Chrome tab and it shifts to the tab closing button at that exact moment.

To be honest, sadly I find it unusable in those conditions.

Marko19907 commented 3 weeks ago

Hi there, I totally understand your frustration. I’ve found myself almost starting Discord calls and waiting for the windows to move before clicking on something important.

I’ve been thinking of adding a small red dot to the taskbar icon right before the windows are about to move. This might be too subtle, especially since many OLED users might want to hide the taskbar.

I'm hesitant to add a more obtrusive overlay, but I'm open to ideas. Do you think the dot would be sufficient, or do you have other suggestions on how to best handle this?

lucas-teks commented 3 weeks ago

Hey, thanks for your reactivity and enthusiasm!

I was thinking about setting a blinking border few seconds around the focused window. I'm totally stranger to Windows API, but apparently this can be done through WS_BORDER in the Win32 API (see: https://falloutsoftware.com/tutorials/win/win5.htm)

This could be a border such as the native textarea outline: image

Also, I think you would need to add an alternative/second option as a sound effect. Some free licensed notify/alert sound effects you might find interesting: https://pixabay.com/sound-effects/search/alert

I like this one, it's not too weird, too long or too dimmed: image

Marko19907 commented 3 weeks ago

Hey, that approach works when you're the owner of the window, but not when you're trying to modify other windows. The AlwaysOnTop tool from PowerToys is able to add a border over the pinned window, so we could potentially copy their approach.

You can check out their implementation here:

It's a bit complicated since we’d need to create a window on top of the current window and then use Direct2D to draw the border. I'm not a Win32 expert myself either, so take this with a grain of salt.

As for the sound, I couldn’t find anything that perfectly fits. Most of the available options are either too loud or distracting. I think a good approach might be to allow users to choose a custom sound by setting a path to a sound file in the config. That way, they can pick what works best for them.