diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-05-14 17:21:25 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-05-14 17:21:25 +0200 |
| commit | b6dae138d4422049e87f46d4a0155c6238a0992e (patch) | |
| tree | e57e767803eda4cab007446b64fb7d3432118c10 /src/drivers | |
| parent | 7fe6f4cf1d155235922956b242fb40d28e89b135 (diff) | |
Restore top-level GL window under Weston.
Diffstat (limited to 'src/drivers')
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx | 4 | ||||
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx index 686816203..67ad43b9e 100644 --- a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx @@ -242,7 +242,7 @@ void Fl_Wayland_Gl_Window_Driver::make_current_before() { egl_surface = eglCreateWindowSurface(egl_display, g->egl_conf, egl_window, NULL); //fprintf(stderr, "Created egl surface=%p at scale=%d\n", egl_surface, win->scale); wl_surface_set_buffer_scale(surface, win->scale); - if (Fl_Wayland_Screen_Driver::compositor == Fl_Wayland_Screen_Driver::WESTON) { + if (pWindow->parent() && Fl_Wayland_Screen_Driver::compositor == Fl_Wayland_Screen_Driver::WESTON) { bool done = false; struct wl_callback *callback = wl_surface_frame(surface); wl_surface_commit(surface); @@ -344,7 +344,7 @@ void Fl_Wayland_Gl_Window_Driver::resize(int is_a_resize, int W, int H) { if (W2 != W || H2 != H) { wl_egl_window_resize(egl_window, W, H, 0, 0); //fprintf(stderr, "Fl_Wayland_Gl_Window_Driver::resize to %dx%d\n", W, H); - egl_resize_in_progress = true; + if (!Fl_Window::is_a_rescale()) egl_resize_in_progress = true; } } diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx index 7b12ca124..7b4b34116 100644 --- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx @@ -513,8 +513,10 @@ static void wl_keyboard_enter(void *data, struct wl_keyboard *wl_keyboard, seat->keyboard_surface = surface; seat->keyboard_enter_serial = serial; Fl_Window *win = Fl_Wayland_Screen_Driver::surface_to_window(surface); - Fl::handle(FL_FOCUS, win); - fl_find(fl_xid(win)); + if (win) { + Fl::handle(FL_FOCUS, win); + fl_find(fl_xid(win)); + } } struct key_repeat_data_t { |
