Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiSplitPane should not grab touches inside content #255

Merged
merged 1 commit into from Apr 14, 2017

Conversation

ericnondahl
Copy link
Contributor

Fixing an issue where the MultiSplitPane was grabbing touches inside the content area - it should only consume touches on the handles which is the interaction area of the class. This was blocking other listeners behind the MultiSplitPane.

@kotcrab kotcrab added the ui label Apr 14, 2017
@kotcrab
Copy link
Owner

kotcrab commented Apr 14, 2017

I'm pretty sure returning true does not affect event propagation within stage2d. From InputListener#touchDown javadocs:

	/** Called when a mouse button or a finger touch goes down on the actor. If true is returned, this listener will receive all
	 * touchDragged and touchUp events, even those not over this actor, until touchUp is received. Also when true is returned, the
	 * event is {@link Event#handle() handled}.
	 * @see InputEvent */

From Event#handle()

	/** Marks this event as handled. This does not affect event propagation inside scene2d, but causes the {@link Stage} event
	 * methods to return true, which will eat the event so it is not passed on to the application under the stage. */

Which means that other listeners in stage2d will receive event but it won't be passed to next InputProcessor in InputMultiplexer, not sure if you meant that.

I'll merge this but I need to fix cursor handling anyways. Seems like some libgdx update changed how exit() is called which now resets custom cursor before dragging has been finished. This also affects VisSplitPane.

Thanks!

@kotcrab kotcrab merged commit 7682e0a into kotcrab:master Apr 14, 2017
@kotcrab
Copy link
Owner

kotcrab commented Apr 14, 2017

Fixed. I've also added you to contributors list. Note that next snapshot version was set to 1.4.0-SNAPSHOT if you want to try it out before release.

@ericnondahl
Copy link
Contributor Author

Thanks - It was another InputProcessor that was blocked for us here, not other scene2d UI - that's an interesting distinction, I wasn't aware of that. We are almost always using a second InputProcessor so i'm pretty conservative on returning true only when needed.

@ericnondahl ericnondahl deleted the MultiSplitPane-Touch-Handling branch April 17, 2017 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants