DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
Link: http://www.fltk.org/str.php?L2051
Version: 1.3-current
Link: http://www.fltk.org/str.php?L2051
Version: 1.3-current
--- src/Fl_Tile.cxx.original 2008-09-16 04:26:22.000000000 -0300
+++ src/Fl_Tile.cxx 2008-09-29 09:58:40.000000000 -0300
@@ -136,40 +136,41 @@
case FL_MOVE:
case FL_ENTER:
- case FL_PUSH: {
- int mindx = 100;
- int mindy = 100;
- int oldx = 0;
- int oldy = 0;
- Fl_Widget*const* a = array();
- int *q = sizes();
- int *p = q+8;
- for (int i=children(); i--; p += 4) {
- Fl_Widget* o = *a++;
- if (o == resizable()) continue;
- if (p[1]<q[1] && o->y()<=my+GRABAREA && o->y()+o->h()>=my-GRABAREA) {
- int t = mx - (o->x()+o->w());
- if (abs(t) < mindx) {
- sdx = t;
- mindx = abs(t);
- oldx = p[1];
- }
+ case FL_PUSH:
+ if(active()) {
+ int mindx = 100;
+ int mindy = 100;
+ int oldx = 0;
+ int oldy = 0;
+ Fl_Widget*const* a = array();
+ int *q = sizes();
+ int *p = q+8;
+ for (int i=children(); i--; p += 4) {
+ Fl_Widget* o = *a++;
+ if (o == resizable()) continue;
+ if (p[1]<q[1] && o->y()<=my+GRABAREA && o->y()+o->h()>=my-GRABAREA) {
+ int t = mx - (o->x()+o->w());
+ if (abs(t) < mindx) {
+ sdx = t;
+ mindx = abs(t);
+ oldx = p[1];
+ }
+ }
+ if (p[3]<q[3] && o->x()<=mx+GRABAREA && o->x()+o->w()>=mx-GRABAREA) {
+ int t = my - (o->y()+o->h());
+ if (abs(t) < mindy) {
+ sdy = t;
+ mindy = abs(t);
+ oldy = p[3];
+ }
+ }
}
- if (p[3]<q[3] && o->x()<=mx+GRABAREA && o->x()+o->w()>=mx-GRABAREA) {
- int t = my - (o->y()+o->h());
- if (abs(t) < mindy) {
- sdy = t;
- mindy = abs(t);
- oldy = p[3];
- }
- }
- }
- sdrag = 0; sx = sy = 0;
- if (mindx <= GRABAREA) {sdrag = DRAGH; sx = oldx;}
- if (mindy <= GRABAREA) {sdrag |= DRAGV; sy = oldy;}
- set_cursor(this, cursors[sdrag]);
- if (sdrag) return 1;
- return Fl_Group::handle(event);
+ sdrag = 0; sx = sy = 0;
+ if (mindx <= GRABAREA) {sdrag = DRAGH; sx = oldx;}
+ if (mindy <= GRABAREA) {sdrag |= DRAGV; sy = oldy;}
+ set_cursor(this, cursors[sdrag]);
+ if (sdrag) return 1;
+ return Fl_Group::handle(event);
}
case FL_LEAVE:
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs