It is currently April 26th, 2024, 11:46 pm

Bug with InputText & FocusDismiss option

Report bugs with the Rainmeter application and suggest features.
User avatar
Corvust
Posts: 7
Joined: June 5th, 2018, 7:15 pm

Bug with InputText & FocusDismiss option

Post by Corvust »

While playing with InputText I discovered a (probably) unintentional behavior.

Code: Select all

[Rainmeter]
MouseLeaveAction=[!DeactivateConfig]

[Variables]
Var=

[BG]
Meter=Image
w=200
h=200
SolidColor=255,127,127
LeftMouseUpAction=[!CommandMeasure InputText "ExecuteBatch 1"]

[InputText]
Measure=Plugin
Plugin=InputText
SolidColor=127,127,127
FontColor=30,30,30
FontFace=Seqoe UI
FontSize=10
X=10
Y=10
H=100
W=180
FocusDismiss=0
DefaultValue="Change Me!"
Command1=[!SetVariable Var "$UserInput$"]
If you trigger an inputtext plugin that has set FocusDismiss=0, if this skin is then deactivated while you are still interacting with this input box, you will then be locked in this "focus state". You will not be able to interact with any rainmeter skins or the rainmeter manage window. Mouse actions (mouse over/leave, left up/down, right up/down) will not be triggered, the manage window freezes. Other applications still function the same though.

AFAIK the only solution is to stop rainmeter through the task manager and restart it.

Here's a demonstration of it in action: https://gfycat.com/livedaringiberianmole
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Bug with InputText & FocusDismiss option

Post by Yincognito »

Corvust wrote: May 12th, 2020, 10:03 amWhile playing with InputText I discovered a (probably) unintentional behavior.
I'm not sure how much of a bug or unintentional behavior this is (I guess some proper "reset" of things on skin deactivation could be considered by the developers, if they deem it necessary), but the behavior (though not considering your skin deactivation scenario) is described in the manual, if you read the notes carefully: here (the Note) and here. The interesting thing is that I tried pressing Escape and Enter afterwards to re-enable mouse actions, but probably due to the fact that the InputText meter / skin that triggered this wasn't active anymore, it didn't work.

Anyway, I liked this test. I'd be curious to see what's the developers' take on this. In my view, this just as much of a bug as it is the expected behavior, it could be interpreted either way - and this is one of the things that makes it interesting.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Brian
Developer
Posts: 2686
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Bug with InputText & FocusDismiss option

Post by Brian »

Corvust wrote: May 12th, 2020, 10:03 am AFAIK the only solution is to stop rainmeter through the task manager and restart it.
It seems to resolve itself after ~30 seconds or so (at least for me) - but this is definitely a bug.



This has been fixed for the next beta. Good catch. This particular issue has been around since at least 2013 when we converted this plugin to the new api.

The problem was after the text box was disposed of, the thread would lock up waiting for other messages to process.

-Brian
User avatar
Corvust
Posts: 7
Joined: June 5th, 2018, 7:15 pm

Re: Bug with InputText & FocusDismiss option

Post by Corvust »

Thanks.