Author Topic: [v1.7.5] "Restrict Mouse Movement" action doesn't work if mouse is uninitialized  (Read 1681 times)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Possibly related to this ancient issue(which still applies in v1.7.5):

When a profile has not yet had a mouse shortcut set(possibly other things enable it as well, as it did start working at some point, but I'm not sure what), the "Restrict Mouse Movement" action does nothing.
However, if after executing a command with that action in it you switch to a profile that does have this action working, it will kick in immediately after switching(executing a command with the restriction set to 0 before switching will prevent this).
If you switch between profiles that don't have it working, it won't activate, until you switch to one that does.

Comparing the .vap files of a working and a non-working profile, this is what makes the difference:
Code: [Select]
<HasMB>false</HasMB>If that is set to false, the action won't work, only if it's set to true.


Also applies to v1.7.5.3


EDIT: All fixed in v1.7.5.23
« Last Edit: May 27, 2019, 03:20:53 PM by Pfeil »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
You are absolutely right.  This is fixed, however, the value is cached at the command level at save time to minimize when the mouse hooks are turned on (HasMB (mouse blocking)).  That would mean that you'd have to edit your command and save it again in order to propagate the change.  The good news is that the blocks are removed if a, 'stop all commands' action is issued (because that is aggravating lol o_O).

The ancient problem could have been just that I had at least one mouse shortcut turned on - which will turn the hooks on.

Edit - also unblocks the keyboard on stop all commands.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
In v1.7.5.8, editing and saving the old command does fix this, however, in line with the ancient issue, it only takes effect once the profile is reloaded.

This also means that a newly created profile will not have this action operational until it is reloaded.

For mouse button shortcuts, a newly created profile will have them working only if the command containing the shortcut was created at the same time the profile is.
If the profile is saved(using "Done", as "Apply" is not available until it has been saved at least once), then edited to add a mouse button shortcut(either for a new or existing command), the mouse shortcut will not work until the profile has been reloaded.

For the "Restrict Mouse Movement" action, it does not matter whether the command is created during or after profile creation.


EDIT: Testing with v1.7.5.12:

The "Restrict Mouse Movement" action now works immediately.

Mouse shortcuts added after profile creation still require a profile reload, unless a command with the "Restrict Mouse Movement" action is added, in which case both will work correctly.
« Last Edit: May 13, 2019, 09:58:05 PM by Pfeil »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Ok - I think I've got the shorcuts going.  As you can tell, I'm very sparing on the mouse hooks ;)