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

dragInfo.position #50

Open
timredfern opened this issue Jan 28, 2013 · 2 comments
Open

dragInfo.position #50

timredfern opened this issue Jan 28, 2013 · 2 comments

Comments

@timredfern
Copy link

I'm getting funny results for position when using dragEvent in fenster

I notice in ofxFensterManager on line 300:

....info.position.set(dragnDropData->x,dragnDropData->y); //TODO check if drag'n'drop position is actually correct

I've looked at the numbers being produced and I think this is nearly right:

....info.position.set((float)dragnDropData->y,(float)(dragnDropData->x>>16));

Here, the coords seem to be coming out correctly, but I see some anamalous behaviour - sometimes it will return 0 for position.y and sometimes will show erroneous entries in the file list.

@underdoeg
Copy link
Owner

Thanks for your report. Can you give me a little more information? E.g. what platform you're on?

@timredfern
Copy link
Author

Xubuntu 12.10 x64 with openFrameworks pulled from the main banch on 31-08-12

For me drag and drop only works with Fenster. The drag and drop events in openFramework's eventsExample don't show up.

The funny results I am getting seem to relate to the fact that the reported position comes from the bottom left of the icon of the item that is dragged in but the window manager seems to use the top left in determining whether the mouse is in the window. So there is a strip at the bottom of the screen where Y is reported as 0.

X and Y are definately swapped and the Y data is left shifted by 16 bits.

TR

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

No branches or pull requests

2 participants