Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

[[ Bug 22211 ]] Remove unnecessary 'unlock cursor' in ideMouseMove #2092

Closed
wants to merge 1 commit into from

Conversation

livecodepanos
Copy link
Contributor

@livecodepanos livecodepanos commented Oct 15, 2019

This patch removes a seemingly unnecessary unlock cursor in the IDE's
mouseMove event handler (ideMouseMove).

The IDE intercepts mouseMove so that it can update the resize cursor
used when the mouse is over the relevant selection handlers. It does this
by locking the cursor in this case and then changing the cursor
appropriately; unlocking the cursor when there is a selected object and
the mouse is not over a selection handle.

Previously it would also unlock the cursor if pointer tool was in effect and
there was no selected object which (because the handler is executed in
time after any user handlers) would undo any user use of lock cursor.

Closes https://quality.livecode.com/show_bug.cgi?id=22211

@livecodepanos livecodepanos added this to the 9.5.1-rc-1 milestone Oct 15, 2019
@livecodepanos livecodepanos changed the base branch from develop-9.5 to develop December 9, 2019 11:40
@livecodepanos livecodepanos modified the milestones: 9.5.2-rc-1, 9.6.0-dp-2 Dec 9, 2019
@livecodepanos livecodepanos modified the milestones: 9.6.0-dp-2, 9.6.0-rc-1 Apr 16, 2020
@runrevmark runrevmark changed the title [22211] Remove unbalanced "unlock cursor" [[ Bug 22211 ]] Remove unnecessary 'unlock cursor' in ideMouseMove Apr 27, 2020
@runrevmark
Copy link
Contributor

I suggest updating the title of the commit message to:

[[ Bug 22211 ]] Remove unnecessary 'unlock cursor' in ideMouseMove

And then have a commit message body:

This patch removes a seemingly unnecessary `unlock cursor` in the IDE's
mouseMove event handler (`ideMouseMove`).

The IDE intercepts mouseMove so that it can update the resize cursor
used when the mouse is over the relevant selection handlers. It does this
by locking the cursor in this case and then changing the cursor
appropriately; unlocking the cursor when there is a selected object and
the mouse is not over a selection handle.

Previously it would also unlock the cursor if pointer tool was in effect and
there was no selected object which (because the handler is executed in
time after any user handlers) would undo any user use of `lock cursor`.

@@ -0,0 +1 @@
# Ensure lock cursor does not break when the pointer tool is selected
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest

# Fix IDE interference with locking the cursor when pointer tool is selected

This patch removes a seemingly unnecessary `unlock cursor` in the IDE's
mouseMove event handler (`ideMouseMove`).

The IDE intercepts mouseMove so that it can update the resize cursor
used when the mouse is over the relevant selection handlers. It does this
by locking the cursor in this case and then changing the cursor
appropriately; unlocking the cursor when there is a selected object and
the mouse is not over a selection handle.

Previously it would also unlock the cursor if pointer tool was in effect and
there was no selected object which (because the handler is executed in
time after any user handlers) would undo any user use of `lock cursor`.
@livecodepanos
Copy link
Contributor Author

Setting the to WIP for further investigation, as this patch introduces this regression:

Recipe: Move from a selection handle horizontally left out of the selected objects rect.

Expected result: The cursor to switch from the resizing cursor to the usual one
Observed result: Cursor is stuck to resize cursor, even after leaving the selection handles of the selectedObject

BerndN added a commit to BerndN/livecode-ide that referenced this pull request May 6, 2020
This patch removes a seemingly unnecessary `unlock cursor` in the IDE's
mouseMove event handler (`ideMouseMove`).

The IDE intercepts mouseMove so that it can update the resize cursor
used when the mouse is over the relevant selection handlers. It does this
by locking the cursor in this case and then changing the cursor
appropriately; unlocking the cursor when there is a selected object and
the mouse is not over a selection handle.

Previously it would also unlock the cursor if pointer tool was in effect and
there was no selected object which (because the handler is executed in
time after any user handlers) would undo any user use of `lock cursor`.

This fixes bug 22211 and bug 18428 and avoids the problems of a fix for these in 
livecode#2092
@livecodepanos
Copy link
Contributor Author

Replaced by #2132

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants