Fix issue about Fl_Tabs and maximizing window under Windows (#1075)

This commit is contained in:
ManoloFLTK
2024-09-25 10:23:47 +02:00
parent a333817f41
commit 84eeac5892
+5
View File
@@ -528,6 +528,7 @@ int Fl_Tabs::handle(int event) {
static int initial_x = 0; static int initial_x = 0;
static int initial_tab_offset = 0; static int initial_tab_offset = 0;
static int forward_motion_to_group = 0; static int forward_motion_to_group = 0;
static Fl_Widget *o_push_drag = NULL;
Fl_Widget *o; Fl_Widget *o;
int i; int i;
@@ -563,11 +564,15 @@ int Fl_Tabs::handle(int event) {
} }
/* FALLTHROUGH */ /* FALLTHROUGH */
case FL_DRAG: case FL_DRAG:
o_push_drag = which(Fl::event_x(), Fl::event_y());
case FL_RELEASE: case FL_RELEASE:
if (forward_motion_to_group) { if (forward_motion_to_group) {
return Fl_Group::handle(event); return Fl_Group::handle(event);
} }
o = which(Fl::event_x(), Fl::event_y()); o = which(Fl::event_x(), Fl::event_y());
if (event == FL_RELEASE && o != o_push_drag) { // see issue #1075
return 1;
}
if ( (overflow_type == OVERFLOW_DRAG) || (overflow_type == OVERFLOW_PULLDOWN) ) { if ( (overflow_type == OVERFLOW_DRAG) || (overflow_type == OVERFLOW_PULLDOWN) ) {
if (tab_pos[children()] < w() && tab_offset == 0) { if (tab_pos[children()] < w() && tab_offset == 0) {
// fall through // fall through