Giter Site home page Giter Site logo

Comments (5)

TokageItLab avatar TokageItLab commented on July 22, 2024 1

I have investigated and found that the problem is probably due to the fact that InputEventMouseMotion at line 3049 in animation_track_editor.cpp is valid even though it should not be fired when closing a popup. But in animation_bezier_editor.cpp, mouse events are not fired when closing a popup although it is similar implementation with animation_track_editor.cpp. The timing of adding popups between them is different, so I tried changing the process priority of the popup node, but that did not solve the problem.

animation_track_editor.cpp: line 3049

if (mm.is_valid() && mm->get_button_mask().has_flag(MouseButtonMask::LEFT) && moving_selection_attempt) {
	if (!moving_selection) {
		moving_selection = true;
		emit_signal(SNAME("move_selection_begin"));
	}

	float moving_begin_time = ((moving_selection_mouse_begin_x - timeline->get_name_limit()) / timeline->get_zoom_scale()) + timeline->get_value();
	float new_time = ((mm->get_position().x - timeline->get_name_limit()) / timeline->get_zoom_scale()) + timeline->get_value();
	float delta = new_time - moving_begin_time;
	float snapped_time = editor->snap_time(moving_selection_pivot + delta);

	float offset = 0.0;
	if (abs(editor->get_moving_selection_offset()) > CMP_EPSILON || (snapped_time > moving_selection_pivot && delta > CMP_EPSILON) || (snapped_time < moving_selection_pivot && delta < -CMP_EPSILON)) {
		offset = snapped_time - moving_selection_pivot;
		moving_selection_effective = true;
	}

	emit_signal(SNAME("move_selection"), offset);
}

It seems that #92424 is causing the unintended firing of mouse events (I have confirmed that mouse events are not fired when the popup closes in prior commit from that), but I don't have a detailed reason as to why this is happening.

@bruvzg Do you have any idea?

from godot.

matheusmdx avatar matheusmdx commented on July 22, 2024

Bisecting points to #92424 as the culprit:

image

from godot.

bruvzg avatar bruvzg commented on July 22, 2024

Check if it's fixed by #93105, might be the same issue.

from godot.

TokageItLab avatar TokageItLab commented on July 22, 2024

@bruvzg The issue still occurs in the latest commit after merging it, so it seems to be a different problem.

from godot.

bruvzg avatar bruvzg commented on July 22, 2024

Seems like mouse move event can be received after closing popup wit
h a click and button can be still pressed, but I do not see anything wrong with it, since mouse is moving and button is pressed.

You can also do the same by opening a popup menu, holding down the left button (while hovering the menu separator) and closing the menu with ESC, the key will be moving until you release the button.

from godot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.