openframeworks / openframeworks/openFrameworks

dragEvent bad mouse coordinates (ubuntu 14.04)

Open
#4,924 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

Context : Of 0.9.0 on ubuntu 14.04.

Here is the scenario :

  • I drop a file into my OfWindow
  • dragEvent is called with ofDragInfo mouse position at X, Y
  • I click
  • mousePressed is called with mouse position at X, Y
  • I move my mouse just a bit 1 pixel right and one pixel left (to force mouse event to occur)
  • I click
  • mousePressed is called with mouse position at X-10, Y-40
  • these last coordinate should be the expected ones.

My workaround for now to avoid this bug is to patch coordinate like this in my dragEvent handler : dragInfo.position - ofPoint(10, 40)

So my guess is mouse coordinates are wrong during dragging since all mouse events gives expected X + 10 and expected Y + 40.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the dragEvent and mousePressed sequence on Ubuntu 14.04 with openFrameworks 0.9.0, comparing the reported X/Y values before and after the one-pixel move. Trace the dragEvent and mousePressed entry points and the ofDragInfo position; done means both event paths report the expected coordinates without the stated (10, 40) correction.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux, ubuntu
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.