It is currently April 19th, 2024, 4:34 pm

[SUGGESTION] InputText OnFocusAction

Report bugs with the Rainmeter application and suggest features.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: [SUGGESTION] InputText OnFocusAction

Post by death.crafter »

Cariboudjan wrote: August 3rd, 2021, 3:00 pm Would love it if at least Rainmeter were changed to ignore focus to an Input Text Box entirely. Leaving the existing OnFocus/OnUnfocus actions untriggered while the Input Text Box has focus in windows.
Even so I wonder how they will do that. When InputText is created, it doesn't have any characteristics that say that it is from Rainmeter. It is just an independent window. Even the window handles are random for the same input text.

I guess they have to rethink the InputText altogether.
from the Realm of Death
User avatar
Cariboudjan
Posts: 268
Joined: May 12th, 2019, 8:55 am

Re: [SUGGESTION] InputText OnFocusAction

Post by Cariboudjan »

Rephrasing, I mean the skin of which the input text box was activated from should retain official focus, and any focus to an input text box itself (since the box is its own window) should be ignored entirely by Rainmeter. Focus remains on the skin which the input text box was activated from and remain so until that skin loses focus by some other means.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: [SUGGESTION] InputText OnFocusAction

Post by death.crafter »

Cariboudjan wrote: August 3rd, 2021, 5:04 pm Rephrasing, I mean the skin of which the input text box was activated from should retain official focus, and any focus to an input text box itself (since the box is its own window) should be ignored entirely by Rainmeter. Focus remains on the skin which the input text box was activated from and remain so until that skin loses focus by some other means.
If you are using a input field, focus needs to stay there. If the text field is not a part of the skin itself, the skin will lose focus. This is how Windows does things.
from the Realm of Death
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [SUGGESTION] InputText OnFocusAction

Post by balala »

Cariboudjan wrote: August 3rd, 2021, 3:00 pm Would love it if at least Rainmeter were changed to ignore focus to an Input Text Box entirely.
If I'm not wrong, this would violate the backward compatibility principle. At least this is my (maybe wrong?) opinion....
User avatar
Yincognito
Rainmeter Sage
Posts: 7125
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [SUGGESTION] InputText OnFocusAction

Post by Yincognito »

Cariboudjan wrote: August 3rd, 2021, 5:04 pmand any focus to an input text box itself (since the box is its own window) should be ignored entirely by Rainmeter
I understand the rephrase and see what you mean, but unfortunately, I believe this would also break the input text's FocusDismiss and OnDismissAction, if those are based (like I suspect they are) on Windows' focus events as well. :confused:

That being said, I'm just mostly speculating here. I could be wrong...
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: [SUGGESTION] InputText OnFocusAction

Post by Active Colors »

balala wrote: August 3rd, 2021, 6:42 pm If I'm not wrong, this would violate the backward compatibility principle. At least this is my (maybe wrong?) opinion....
If it is a new plugin then it would not violate anything ;)
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [SUGGESTION] InputText OnFocusAction

Post by balala »

Active Colors wrote: August 4th, 2021, 9:14 am If it is a new plugin then it would not violate anything ;)
Was it about a new plugin? Sorry, I didn't notice...
User avatar
Yincognito
Rainmeter Sage
Posts: 7125
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [SUGGESTION] InputText OnFocusAction

Post by Yincognito »

One more alternative: if it's only about not executing the focus / unfocus bang sequence when it's an input text stealing the focus, then I believe this could be achieved by a left mouse up on the meter associated with the input text setting a variable indicating that an input text received focus, passing the variable value to the other skin(s) of concern through a skin based set variable, then, in the other skin(s), execute the bang sequence(s) only if the value passed earlier is not indicating an input text stole the focus. Obviously, the variable would be reset to 0 or whatever on the input text's on focus dismiss.

Basically, this won't ignore the focus / unfocus actions themselves, just the execution of the bang sequences that make up those actions, more or less achieving the desired goal.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth