Skip to content

Prevent other inputs while dragging#55411

Open
ConteZero wants to merge 1 commit intogodotengine:masterfrom
ConteZero:viewport_drag_input
Open

Prevent other inputs while dragging#55411
ConteZero wants to merge 1 commit intogodotengine:masterfrom
ConteZero:viewport_drag_input

Conversation

@ConteZero
Copy link
Copy Markdown
Contributor

This commit prevent other inputs to interfere with dragging operation.

@reduz
Copy link
Copy Markdown
Member

reduz commented Jul 31, 2022

This makes sense, but I believe it can break some scenarios (press some keys while dragging to adjust how the object will be dropped, we use this in some situations while dropping objects into the 2D/3D viewport). Maybe it should be optional when drag begins?

@ConteZero
Copy link
Copy Markdown
Contributor Author

This makes sense, but I believe it can break some scenarios (press some keys while dragging to adjust how the object will be dropped, we use this in some situations while dropping objects into the 2D/3D viewport). Maybe it should be optional when drag begins?

I think there are two possible ways to solve this problem:

  1. make it optional as you wrote
  2. block all inputs by default and pass an array with the key codes to exclude from blocking

For 2) I don't know if adding an optional parameter to Control::get_drag_data will work, unfortunately it's been a long time since I've been working on this code, so I don't quite remember the details of how drag and drop is implemented.

Right now I don't have the time to work on it, so if anyone else wants to do it, they're welcome.

@Sauermann
Copy link
Copy Markdown
Contributor

In its current form, this PR will interfere with the recently merged #68418

@YuriSizov YuriSizov modified the milestones: 4.0, 4.x Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants