It is currently September 10th, 2024, 5:06 pm
[Bug] Deactivating/hiding configs causes focus to change, triggering OnFocus/UnfocusActions
-
- Posts: 278
- Joined: May 12th, 2019, 8:55 am
[Bug] Deactivating/hiding configs causes focus to change, triggering OnFocus/UnfocusActions
Downgraded to the March update and no problems with this. Seems to happen more often when deactivating or hiding multiple configs in a group bang.
-
- Developer
- Posts: 2726
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
Re: [Bug] Deactivating/hiding configs causes focus to change, triggering OnFocus/UnfocusActions
I can't replicate this.
Rainmeter doesn't ever transfer focus from one skin to another. In fact, the only time Rainmeter sets the focus is editing a label in the tree control on the New Skin dialog in order to monitor the key strokes (specifically the escape and return keys).
Windows (most of the time) controls focus, and usually transfers focus to last "active" window (usually the window next in the z order).
The OnFocus/OnUnFocuse bangs are only executed when Windows sends the WM_FOCUS/WM_KILLFOCUS messages.
So, maybe the skins being deactived are "next" in the z order, and Windows gives them focus before deactivating them, thus causing them to execute the focus actions?
-Brian
Rainmeter doesn't ever transfer focus from one skin to another. In fact, the only time Rainmeter sets the focus is editing a label in the tree control on the New Skin dialog in order to monitor the key strokes (specifically the escape and return keys).
Windows (most of the time) controls focus, and usually transfers focus to last "active" window (usually the window next in the z order).
The OnFocus/OnUnFocuse bangs are only executed when Windows sends the WM_FOCUS/WM_KILLFOCUS messages.
So, maybe the skins being deactived are "next" in the z order, and Windows gives them focus before deactivating them, thus causing them to execute the focus actions?
-Brian
-
- Posts: 278
- Joined: May 12th, 2019, 8:55 am
Re: [Bug] Deactivating/hiding configs causes focus to change, triggering OnFocus/UnfocusActions
I think that's exactly right. It occurs when multiple skins are hidden or deactivated at one time where:
There are 3 skins.
Focus is on Skin 2. Then on Skin 3.
Skin 1 gains focus, deactivating Skin 3 and Skin 2 in the process.
An Unfocus Action is triggered.