Wayland: Fix resize of menutitle windows when across 2 screens with diverse scaling - cont'd.
This commit is contained in:
parent
72396f7ecd
commit
3a2f4b3a94
@ -190,6 +190,12 @@ static menuwindow *to_menuwindow(Fl_Window *win) {
|
|||||||
return ((window_with_items*)win)->as_menuwindow();
|
return ((window_with_items*)win)->as_menuwindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Returns whether win is from class menutitle */
|
||||||
|
bool Fl_Window_Driver::to_menutitle(Fl_Window *win) {
|
||||||
|
if (!Fl_Window_Driver::driver(win)->popup_window() || !win->menu_window()) return false;
|
||||||
|
return !((window_with_items*)win)->as_menuwindow();
|
||||||
|
}
|
||||||
|
|
||||||
/** Accessor to the "origin" member variable of class menuwindow.
|
/** Accessor to the "origin" member variable of class menuwindow.
|
||||||
Variable origin is not NULL when 2 menuwindow's occur, one being a submenu of the other;
|
Variable origin is not NULL when 2 menuwindow's occur, one being a submenu of the other;
|
||||||
it links the menuwindow at right to the one at left. */
|
it links the menuwindow at right to the one at left. */
|
||||||
|
|||||||
@ -197,6 +197,7 @@ public:
|
|||||||
// when that's not the case, as with Wayland.
|
// when that's not the case, as with Wayland.
|
||||||
virtual void reposition_menu_window(int x, int y);
|
virtual void reposition_menu_window(int x, int y);
|
||||||
virtual void menu_window_area(int &X, int &Y, int &W, int &H, int nscreen = -1);
|
virtual void menu_window_area(int &X, int &Y, int &W, int &H, int nscreen = -1);
|
||||||
|
static bool to_menutitle(Fl_Window*);
|
||||||
static Fl_Window *menu_parent(int *display_height = NULL);
|
static Fl_Window *menu_parent(int *display_height = NULL);
|
||||||
static Fl_Window *menu_leftorigin(Fl_Window*);
|
static Fl_Window *menu_leftorigin(Fl_Window*);
|
||||||
static Fl_Window *menu_title(Fl_Window*);
|
static Fl_Window *menu_title(Fl_Window*);
|
||||||
|
|||||||
@ -723,7 +723,7 @@ static void surface_enter(void *data, struct wl_surface *wl_surface,
|
|||||||
while (e->next != &window->outputs) e = e->next; // move e to end of linked list
|
while (e->next != &window->outputs) e = e->next; // move e to end of linked list
|
||||||
wl_list_insert(e, &surface_output->link);
|
wl_list_insert(e, &surface_output->link);
|
||||||
//printf("window %p enters screen id=%d length=%d\n", window->fl_win, output->id, wl_list_length(&window->outputs));
|
//printf("window %p enters screen id=%d length=%d\n", window->fl_win, output->id, wl_list_length(&window->outputs));
|
||||||
if (list_was_empty && !window->fl_win->parent() && !window->fl_win->menu_window()) {
|
if (list_was_empty && !window->fl_win->parent() && !Fl_Window_Driver::to_menutitle(window->fl_win)) {
|
||||||
change_scale(output, window, pre_scale);
|
change_scale(output, window, pre_scale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user