FLTK logo

[master] b6dae13 - Restore top-level GL window under Weston.

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] b6dae13 - Restore top-level GL window under Weston. "ManoloFLTK" May 14, 2022  
 
commit b6dae138d4422049e87f46d4a0155c6238a0992e
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Sat May 14 17:21:25 2022 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Sat May 14 17:21:25 2022 +0200

    Restore top-level GL window under Weston.

 src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx | 4 ++--
 src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx    | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx
index 6868162..67ad43b 100644
--- src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx
+++ 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 src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
index 7b12ca1..7b4b341 100644
--- src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
+++ 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 {
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.