From 702b452540c1790fd9696794b55eb3286166ab7a Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Thu, 18 Oct 2012 12:56:31 +0000 Subject: Fix STR#2857: screen_xywh() mouse pointer functions may initially return wrong data. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9701 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl.H | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/FL/Fl.H b/FL/Fl.H index 1205a2189..bb4680fc9 100644 --- a/FL/Fl.H +++ b/FL/Fl.H @@ -785,7 +785,9 @@ public: \see void screen_xywh(int &x, int &y, int &w, int &h, int mx, int my) */ static void screen_xywh(int &X, int &Y, int &W, int &H) { - screen_xywh(X, Y, W, H, e_x_root, e_y_root); + int x, y; + Fl::get_mouse(x, y); + screen_xywh(X, Y, W, H, x, y); } static void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my); static void screen_xywh(int &X, int &Y, int &W, int &H, int n); @@ -799,7 +801,9 @@ public: \see void screen_work_area(int &x, int &y, int &w, int &h, int mx, int my) */ static void screen_work_area(int &X, int &Y, int &W, int &H) { - screen_work_area(X, Y, W, H, e_x_root, e_y_root); + int x, y; + Fl::get_mouse(x, y); + screen_work_area(X, Y, W, H, x, y); } /** @} */ -- cgit v1.2.3