StArL0rd84 wrote: ↑June 8th, 2022, 4:18 pm
Yes, for simplicity's sake I chose to omit the rest of the skin.
The skin does not move to the foreground when I mouse over it, and the measure does not return a 1, indicating it has focus.
Tried to add it in other skins too to see if something interfered, but still can't get it to give a skin focus over other open windows.
Not even your example skin.
Maybe I have missed the point of your plugin.
Does it only show if a skin HAS focus, and not TAKE focus?
Was hoping to use this plugin to replace the command line program called RainFocus by ~Faradey~.
Rainmeter version 18.104.22.16832
Windows 11 21H2
Well, it does work ... usually. Except when it doesn't or when it "hangs" Rainmeter (it's the 6th time it does the latter for me, since testing the example skin and writing this post, but don't be scared, more details on what "hang" means below).
In my case, the example skin works as expected after loading, when it's colored magenta and has Focus=0. If I hover over, it turns cyan and Focus=1 so all good till now. If I click on another window or object on the screen (like the Rainmeter Log window or another skin), it correctly turns to green and Focus becomes 0. I can go like this, i.e. hover on the skin then click another window and it will work forever, as desired.
However, if I click on the bare desktop instead of on another window in order to test the focus thing, not only it doesn't turn green apart from the first time clicking on the desktop, but it also "sort of hangs" Rainmeter, i.e. the "always working" cursor of Windows is triggered and the animation in my skin suite pauses (aka hangs as well). I used quotes when mentioning the hanging because apparently you can "unhang" everything just by right clicking the example skin and choosing to Refresh from the context menu. Initially, I had to forcefully kill Rainmeter when the hang happened, but after noticing the above, I just refresh the skin and the hang is magically gone (until next time I try the above), LMAO.
Anyway, back to your point, it does SET the focus on any skin, including itself, I tested it. Obviously, when something gets focused, the focus is TAKEN AWAY from other things, if that's what you meant by TAKE. However, like I mentioned, it has some "quirks" like the desktop thing above or the fact that Focus stays 1 after refreshing the skin, so getting the color change from magenta to cyan on hover won't produce the expected result anymore (as it did before the refresh), unless of course you click something other window or skin to reset Focus to 0 and get back on track with the normal usage scenario.
Bottom line, it is functional and does what you want, bar the 2 cases I referred to above. My impression is that those are probably fixable with minor adjustments to the plugin code. I love the unhang "feature" though, it's something I never saw anywhere else, really.