summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2012-10-18 12:56:31 +0000
committerManolo Gouy <Manolo>2012-10-18 12:56:31 +0000
commit702b452540c1790fd9696794b55eb3286166ab7a (patch)
treea26a12b984659466635e6c11ebd207ad639af7d3
parent9788ee6709e57ed6ea165ada4f3360689817bb4e (diff)
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
-rw-r--r--FL/Fl.H8
1 files 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);
}
/** @} */