We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2990 - When in fullscreen mode mouse coordinates are by a factor of 0.66 too small
Summary: When in fullscreen mode mouse coordinates are by a factor of 0.66 too small
Status: RESOLVED ABANDONED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.3
Hardware: x86_64 Windows 8
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-21 12:29 UTC by kilian
Modified: 2018-08-06 21:20 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kilian 2015-05-21 12:29:57 UTC
Using an opengl window I set window to fullscreen with:

  SDL_SetWindowFullscreen(gWindow,SDL_WINDOW_FULLSCREEN);
  SDL_Rect r;
  SDL_GetDisplayBounds(0, &r);
  is_dragging=0;
  width=r.w;
  height=r.h;
  printf("%d %d !",width,height);
  //   SDL_SetWindowSize(gWindow,width,height); //does not work if commented out or in
  on_surface_changed(width, height);
 

Then reading mouse coordinates with:
 int x_pos, y_pos;
 SDL_GetMouseState(&x_pos,&y_pos);

gives coordinate values which are exactly a factor of 0.6666 too small in x and y.

Note screen resolution before fullscreen mode was exactly a factor of 1/0.6666 larger.

So somehow the mouse thinks it has still the previous resolution. 

Example:
3840x2160 in normal mode.
When switching to full screen I have:
2560x1440

which is exactly a factor of 0.6666 smaller.
Comment 1 Alex Szpakowski 2016-10-08 02:44:50 UTC
Do you use DPI scaling on your system?
Comment 2 Ryan C. Gordon 2018-08-06 21:20:17 UTC
Hello, and sorry if you're getting dozens of copies of this message by email.

We are closing out bugs that appear to be abandoned in some form. This can happen for lots of reasons: we couldn't reproduce it, conversation faded out, the bug was noted as fixed in a comment but we forgot to mark it resolved, the report is good but the fix is impractical, we fixed it a long time ago without realizing there was an associated report, etc.

Individually, any of these bugs might have a better resolution (such as WONTFIX or WORKSFORME or INVALID) but we've added a new resolution of ABANDONED to make this easily searchable and make it clear that it's not necessarily unreasonable to revive a given bug report.

So if this bug is still a going concern and you feel it should still be open: please feel free to reopen it! But unless you respond, we'd like to consider these bugs closed, as many of them are several years old and overwhelming our ability to prioritize recent issues.

(please note that hundred of bug reports were sorted through here, so we apologize for any human error. Just reopen the bug in that case!)

Thanks,
--ryan.