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

GestureDrag does not signal events #1075

Closed
Voker57 opened this issue Oct 23, 2020 · 1 comment
Closed

GestureDrag does not signal events #1075

Voker57 opened this issue Oct 23, 2020 · 1 comment

Comments

@Voker57
Copy link

Voker57 commented Oct 23, 2020

Sorry if I'm again inadvertently using the issues as support, but I triple-checked the testcases to be identical this time :-)

So, creating a GestureDrag on ApplicationWindow in Rust, clicking (or dragging) in the window does not trigger the drag-begin-event, but in C it does.

Testcases: https://github.com/Voker57/gtk-rs-button-testcase/tree/drag

@sdroege
Copy link
Member

sdroege commented Oct 23, 2020

gesture_drag is unreffed at the end of the activate signal handler closure. As nothing else is keeping a reference to it, it is then destroyed and there's no chance for the signal to trigger anymore. You need to keep it alive somehow for as long as you need it.

In the C code you're leaking gesture_drag.

@sdroege sdroege closed this as completed Oct 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants