It is currently August 8th, 2020, 9:02 am

[Possible Bug] LeftMouseDownAction prevents skin from focusing!

Report bugs with the Rainmeter application and suggest features.
DeathByChocolate
Posts: 25
Joined: September 17th, 2014, 8:47 pm

[Possible Bug] LeftMouseDownAction prevents skin from focusing!

Post by DeathByChocolate »

It's all in the title! When I run this test skin:

Test.ini
[Rainmeter]
OnFocusAction=[!Log "Focus"]
OnUnfocusAction=[!Log "Unfocus"]
MouseActionCursor=0

[Background]
Meter=String
W=100
H=100
SolidColor=200,20,20
MouseOverAction=[!SetOption #CurrentSection# SolidColor 210,40,40][!UpdateMeter #CurrentSection#][!Redraw]
MouseLeaveAction=[!SetOption #CurrentSection# SolidColor 200,20,20][!UpdateMeter #CurrentSection#][!Redraw]
LeftMouseDownAction=[!SetOption #CurrentSection# SolidColor 180,0,0][!UpdateMeter #CurrentSection#][!Redraw]
LeftMouseUpAction=[!SetOption #CurrentSection# SolidColor 210,40,40][!UpdateMeter #CurrentSection#][!Redraw]
It never logs "Focus", even though I am clicking on it using my left mouse button. However, when I remove the LeftMouseDownAction option, the logs are fired when expected. Is this a possible bug? If not, how could I get around this?
User avatar
Brian
Developer
Posts: 2044
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: [Possible Bug] LeftMouseDownAction prevents skin from focusing!

Post by Brian »

Thanks for reporting! This has been fixed.

While this is definitely a bug, I have no idea why the "focus" message isn't being sent when processing the left mouse down message. Rainmeter never explicitly "forces" focus on any skin/window. Never. And we most likely never will (3rd party plugins/scripts don't count since we can't enforce that). We let Windows handle this process to give that power to the users.

It is unclear if this problem has always existed with Rainmeter, or if there was a change in Windows itself that has caused this. Right now, with the current version of Windows 10, older versions of Rainmeter are affected by this (at least since we added the OnFocus bangs). I do not have older versions of Windows around to test with.

Anyway, this is now fixed. If anyone is curious, Rainmeter now processes a mouse "activation" message essentially causing the focus messages to be sent appropriately.

-Brian
User avatar
balala
Rainmeter Sage
Posts: 11172
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Possible Bug] LeftMouseDownAction prevents skin from focusing!

Post by balala »

Brian wrote:
April 17th, 2020, 7:40 am
I do not have older versions of Windows around to test with.
Just tested on an older computer of mine, which still has Windows 7 (see specifications below). Working the same way: the Focus message isn't sent neither on Windows 7.
Specifications of the test system:

Rainmeter 4.3.1.3321 beta (32-bit)
Language: English (1033)
Build time: 2019-09-13 16:33:17
Commit Hash: 0ba4dfc4
Windows 7 Ultimate 32-bit (build 7601) Service Pack 1 - Hungarian (1038)
Path: C:\Program Files\Rainmeter\
SkinPath: d:\My Documents\Rainmeter\Skins\
SettingsPath: C:\Users\Laci\AppData\Roaming\Rainmeter\
IniFile: C:\Users\Laci\AppData\Roaming\Rainmeter\Rainmeter.ini
User avatar
jsmorley
Developer
Posts: 21217
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Possible Bug] LeftMouseDownAction prevents skin from focusing!

Post by jsmorley »

This is fixed in the r3348 beta just released.
User avatar
Cariboudjan
Posts: 89
Joined: May 12th, 2019, 8:55 am

Re: [Possible Bug] LeftMouseDownAction prevents skin from focusing!

Post by Cariboudjan »

NOOOOO!!!!!!
Last edited by Cariboudjan on April 18th, 2020, 4:55 am, edited 2 times in total.
User avatar
Cariboudjan
Posts: 89
Joined: May 12th, 2019, 8:55 am

Re: [Possible Bug] LeftMouseDownAction prevents skin from focusing!

Post by Cariboudjan »

OnFocusAction: Fixed a bug where LeftMouseDownAction was not properly recognizing that focus was given to the skin.

I depended on this "bug" for the entire functionality of my suite.

Now it's entirely broken.

http://droptopfour.com/
https://www.deviantart.com/blacksquared/art/droptop-four-762812007

I'm already getting flooded with complaints.

I have worked for years on a project the depended on this fundamentally at its core in order to work, by allowing the user to navigate through several skins without taking focus away from the primary bar, that ultimately registers to close all navigation panes when its UnfocusAction is triggered by clicking anywhere other than Rainmeter or anywhere where LeftMouseUpActions are present.

It's all trash now.
Rainmeter now processes a mouse "activation" message essentially causing the focus messages to be sent appropriately.
Please leave the focus to the windows default! This is not a bug! This "bug" went undetected for years and no one until now even noticed, let alone brought attention to it, and now it's "fixed" for a user who just happened-upon it with no discernible reason for why the "bug" might interfere with any known skin. The "bug" was massively useful for many applications!

Please undo this change! Or implement some way to easily disable this new addition!

I will send the Rainmeter team $200 dollars right now.

Lord knows the team deserves it anyway. But I would really, really, really appreciate it.

Please for the love of God!!
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4067
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: [Possible Bug] LeftMouseDownAction prevents skin from focusing!

Post by eclectic-tech »

jsmorley wrote:
April 17th, 2020, 1:50 pm
This is fixed in the r3348 beta just released.
This fix has introduce a new issue: the release of 'Ctrl+Alt' selected skin groups, for movement together, does not happen when they lose focus.

Once selected, in order to remove the highlight you have to 'Ctrl+Alt' click on every selected skin. :x

Happens in r3348 beta... Does not happen in r3346 beta.

Currently downgraded to r3346...

Rainmeter 4.4.0.3346 beta (64-bit)
Language: English (1033)
Build time: 2020-04-10 8:59:37
Commit Hash: 74dc937f
Windows 10 Pro 2004 64-bit (build 19041) - English (1033)
Path: C:\Program Files\Rainmeter\
SkinPath: C:\Users\John\Rainmeter\Skins\
SettingsPath: C:\Users\John\AppData\Roaming\Rainmeter\
IniFile: C:\Users\John\AppData\Roaming\Rainmeter\Rainmeter.ini
User avatar
jsmorley
Developer
Posts: 21217
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Possible Bug] LeftMouseDownAction prevents skin from focusing!

Post by jsmorley »

eclectic-tech wrote:
April 23rd, 2020, 5:21 pm
This fix has introduce a new issue: the release of 'Ctrl+Alt' selected skin groups, for movement together, does not happen when they lose focus.

Once selected, in order to remove the highlight you have to 'Ctrl+Alt' click on every selected skin. :x

Happens in r3348 beta... Does not happen in r3346 beta.

Currently downgraded to r3346...

Rainmeter 4.4.0.3346 beta (64-bit)
Language: English (1033)
Build time: 2020-04-10 8:59:37
Commit Hash: 74dc937f
Windows 10 Pro 2004 64-bit (build 19041) - English (1033)
Path: C:\Program Files\Rainmeter\
SkinPath: C:\Users\John\Rainmeter\Skins\
SettingsPath: C:\Users\John\AppData\Roaming\Rainmeter\
IniFile: C:\Users\John\AppData\Roaming\Rainmeter\Rainmeter.ini

We coded that with hydroxychloroquine...
User avatar
Brian
Developer
Posts: 2044
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: [Possible Bug] LeftMouseDownAction prevents skin from focusing!

Post by Brian »

eclectic-tech wrote:
April 23rd, 2020, 5:21 pm
This fix has introduce a new issue: the release of 'Ctrl+Alt' selected skin groups, for movement together, does not happen when they lose focus.

Once selected, in order to remove the highlight you have to 'Ctrl+Alt' click on every selected skin. :x

Happens in r3348 beta... Does not happen in r3346 beta.

Currently downgraded to r3346...
Thanks for the heads up. This has been fixed.

-Brian