| [ Return to Bugs & Features | Roadmap 1.3 ]
STR #2857
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 3 - Moderate, e.g. unable to compile the software |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Core Library |
Summary: | screen_xywh mouse pointer functions initially returns wrong data |
Version: | 1.3-current |
Created By: | astrand |
Assigned To: | manolo |
Fix Version: | 1.3-current (SVN: v9701) |
Update Notification: | |
Trouble Report Files:
Trouble Report Comments:
|
#1 | astrand 05:04 Jun 26, 2012 |
| There are two helper functions in screen_xywh that returns the "work area" and "screen" where the mouse pointer is located. However, these initially returns incorrect data when the application starts on a secondary screen. This is because they are using the e_x_root/e_y_root variables, but these cannot be trusted until a mouse or keyboard event has happened. As the comment in Fl.H points out:
/** Return where the mouse is on the screen by doing a round-trip query to the server. You should use Fl::event_x_root() and Fl::event_y_root() if possible, but this is necessary if you are not sure if a mouse event has been processed recently (such as to position your first window). If the display is not open, this will open it. */ static void get_mouse(int &,int &); // platform dependent
The bug is visible with the "fullscreen" test program. When starting it on a secondary screen, you have to press "Update" to get the correct values for "Mouse screen work area". Attaching patch. | |
|
#2 | manolo 06:00 Oct 18, 2012 |
| Fixed in Subversion repository.
Thanks for the patch. | |
[ Return to Bugs & Features ]
|
| |