Wayland: fix opening GL top-level window on 2-screen system - cont'd

This commit is contained in:
ManoloFLTK
2023-05-11 18:59:34 +02:00
parent 37abac2d8e
commit 7ef6b9f802
2 changed files with 1 additions and 2 deletions
@@ -413,7 +413,6 @@ void Fl_Wayland_Gl_Window_Driver::resize(int is_a_resize, int W, int H) {
wl_egl_window_resize(egl_window, W, H, 0, 0);
//fprintf(stderr, "Fl_Wayland_Gl_Window_Driver::resize from %dx%d to %dx%d\n",
// W2, H2, W, H);
Fl::wait(0);
}
/* CONTROL_LEAKING_SUB_GL_WINDOWS
if (Fl_Wayland_Window_Driver::driver(pWindow)->subRect()) {
@@ -442,7 +441,6 @@ void Fl_Wayland_Gl_Window_Driver::gl_start() {
wl_egl_window_get_attached_size(dr->gl_start_support_->egl_window, &W2, &H2);
if (W2 != W || H2 != H) {
wl_egl_window_resize(dr->gl_start_support_->egl_window, W, H, 0, 0);
Fl::wait(0);
}
glClearColor(0., 0., 0., 0.);
glClear(GL_COLOR_BUFFER_BIT);
@@ -669,6 +669,7 @@ static void surface_enter(void *data, struct wl_surface *wl_surface, struct wl_o
win_driver->is_a_rescale(false);
if (window->fl_win->as_gl_window() && !window->fl_win->parent() &&
post_scale != pre_scale) { // necessary for glpuzzle on 2-screen system
Fl::wait(0);
Fl::add_timeout(0.01, (Fl_Timeout_Handler)delayed_redraw, window->fl_win);
}
} else if (window->buffer) {