Improve control of screen where FLTK positions menu windows (#1376)
This commit is contained in:
parent
527972e7a4
commit
ce7b335d4d
@ -183,6 +183,8 @@ protected:
|
|||||||
end();
|
end();
|
||||||
set_modal();
|
set_modal();
|
||||||
clear_border();
|
clear_border();
|
||||||
|
// Put it on same screen as that where Menu_Window::parent_ is.
|
||||||
|
screen_num(Fl_Window_Driver::menu_parent(NULL)->screen_num());
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -1044,7 +1046,7 @@ void Menu_Window::autoscroll(item_index_t n) {
|
|||||||
int Y = y()+Fl::box_dx(box())+2+n*item_height;
|
int Y = y()+Fl::box_dx(box())+2+n*item_height;
|
||||||
|
|
||||||
int xx, ww;
|
int xx, ww;
|
||||||
Fl_Window_Driver::driver(this)->menu_window_area(xx, scr_y, ww, scr_h, Fl::first_window()->screen_num());
|
Fl_Window_Driver::driver(this)->menu_window_area(xx, scr_y, ww, scr_h, this->screen_num());
|
||||||
if (n==0 && Y <= scr_y + item_height) {
|
if (n==0 && Y <= scr_y + item_height) {
|
||||||
Y = scr_y - Y + 10;
|
Y = scr_y - Y + 10;
|
||||||
} else if (Y <= scr_y + item_height) {
|
} else if (Y <= scr_y + item_height) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user