summaryrefslogtreecommitdiff
path: root/src/Fl_Window_hotspot.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1998-11-08 14:36:56 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1998-11-08 14:36:56 +0000
commit37d1178c11bae1c9c7a72816d1cad508fabe4e27 (patch)
treeea3c822a0732334a23ad74f5fb7ef448e677df13 /src/Fl_Window_hotspot.cxx
parent39be2233f48d90a9114e078f15507c31f4df4f45 (diff)
WIN32 fixes from Gustavo for fullscreen mode problems.
git-svn-id: file:///fltk/svn/fltk/trunk@68 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Window_hotspot.cxx')
-rw-r--r--src/Fl_Window_hotspot.cxx19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/Fl_Window_hotspot.cxx b/src/Fl_Window_hotspot.cxx
index 06a3b29d7..d76d6b1b4 100644
--- a/src/Fl_Window_hotspot.cxx
+++ b/src/Fl_Window_hotspot.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Window_hotspot.cxx,v 1.4 1998/11/05 16:04:48 mike Exp $"
+// "$Id: Fl_Window_hotspot.cxx,v 1.5 1998/11/08 14:36:55 mike Exp $"
//
// Common hotspot routines for the Fast Light Tool Kit (FLTK).
//
@@ -34,18 +34,20 @@ void Fl_Window::hotspot(int X, int Y, int offscreen) {
int mx,my; Fl::get_mouse(mx,my);
X = mx-X; Y = my-Y;
if (!offscreen) {
- if (border()) {
- // ensure border is on screen:
#ifdef WIN32
- int top, left, right, bottom;
- Fl_X::get_border(this, top, left, bottom);
- right = left; top += bottom;
+ //These will be used by reference, so we must passed different variables
+ int bt,bx,by;
+ x(X);y(Y);
+ Fl_X::fake_X_wm(this, X, Y, bt, bx, by);
+ //force FL_FORCE_POSITION to be set in Fl_Window::resize()
+ if (X==x()) x(X-1);
#else
+ if (border()) {
+ // ensure border is on screen:
const int top = 20;
const int left = 1;
const int right = 1;
const int bottom = 1;
-#endif
if (X+w()+right > Fl::w()) X = Fl::w()-right-w();
if (X-left < 0) X = left;
if (Y+h()+bottom > Fl::h()) Y = Fl::h()-bottom-h();
@@ -56,6 +58,7 @@ void Fl_Window::hotspot(int X, int Y, int offscreen) {
if (X < 0) X = 0;
if (Y+h() > Fl::h()) Y = Fl::h()-h();
if (Y < 0) Y = 0;
+#endif
}
position(X,Y);
}
@@ -71,5 +74,5 @@ void Fl_Window::hotspot(const Fl_Widget *o, int offscreen) {
}
//
-// End of "$Id: Fl_Window_hotspot.cxx,v 1.4 1998/11/05 16:04:48 mike Exp $".
+// End of "$Id: Fl_Window_hotspot.cxx,v 1.5 1998/11/08 14:36:55 mike Exp $".
//