After much testing, I make the following observations:
If I use MouseOverAction and MouseLeaveAction to "pop" a skin to the front of other non-Rainmeter windows on MouseOver and back to the bottom on MouseLeave, it works great UNLESS you click with either the left or right mouse buttons anywhere on the skin OR on the Windows desktop. Then the skin is set to "bottom" ZPos on the next MouseLeave and completely ignores MouseOver from then on until the skin is refreshed, and it MUST be refreshed via the context menu for rainmeter.exe - (right click, highlight the skin in the list, then select "Refresh Skin" or use "Refresh All" from the main context menu) Until I do this it goes to the bottom and stays there...
Here is the relevant code:
Code: Select all
[Rainmeter]
Author=Jeffrey Morley
Update=1000
MouseOverAction=!execute [!RainmeterZPos 2]
MouseLeaveAction=!execute [!RainmeterZPos -1]
Code: Select all
[Rainmeter]
Author=Jeffrey Morley
Update=1000
MouseOverAction=!execute [!RainmeterZPos 2]
MouseLeaveAction=!execute [!RainmeterZPos 0]
So, how about this?
Code: Select all
[Rainmeter]
Author=Jeffrey Morley
Update=1000
MouseOverAction=!execute [!RainmeterZPos 2]
MouseLeaveAction=!execute [!RainmeterZPos -1][!RainmeterRefresh]
Now here is an interesting twist:
Code: Select all
[Rainmeter]
Author=Jeffrey Morley
Update=1000
MouseOverAction=!execute [!RainmeterZPos 2]
MouseLeaveAction=!execute [!RainmeterZPos -1][!RainmeterRefresh *]
I was hoping that using [!RainmeterRefresh skinname] would work, even though in theory it is effectively the same as [!RainmeterRefresh], but specifying the skin name or defaulting to "current skin" seems to behave the same.
One question... Is anyone sure of the format for the [!RainmeterRefresh skinname] command? What exactly should be the format of "skinname" is it just the name of the skin (in this case it's "JMDock")
[!RainmeterRefresh JMDock]
or
[!RainmeterRefresh JMDock.ini]
or
[!RainmeterRefresh "C:\Program Files\Rainmeter\Skins\JMDock\JMDock.ini"]
or
[!RainmeterRefresh Skins\JMDock\JMDock.ini]
or some variant thereof? I want to be sure I am executing the refresh command correctly before I give up on it.
Here is what my gut is telling me is the root of the problem. it has to do with window "focus". In other words, which window element Windows sees as being "currently active". If you give "focus" to a skin (like JMDock) by clicking on it, then Windows seems to ignore the ZPos commands from Rainmeter until you give the "focus" to some other window. In effect Windows thinks the skin is already "on top" because it has focus, so even though Rainmeter puts it to the bottom, Windows thinks it's still on top and ignores requests to move it. Once you give the "focus" to some other window (by clicking on the titlebar, then Windows sees the new window as being "active" and thus presumably on top, and the Rainmeter skin goes back to behaving as expected.
Not sure how to fix this, but one approach would be a bang which could transfer the Windows "focus" to another skin or another window or at least tell Windows to "lose focus" on the current skin. In other words, a bang to make a specified window "active" and ensure Windows gets the message...
Code: Select all
[Rainmeter]
Author=Jeffrey Morley
Update=1000
MouseOverAction=!execute [!RainmeterZPos 2]
MouseLeaveAction=!execute [!RainmeterZPos -1][!RainmeterLoseFocus]
Code: Select all
[Rainmeter]
Author=Jeffrey Morley
Update=1000
MouseOverAction=!execute [!RainmeterZPos 2]
MouseLeaveAction=!execute [!RainmeterZPos -1][!RainmeterGiveFocus skinname]