diff options
| -rw-r--r-- | documentation/src/wayland.dox | 5 | ||||
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.H | 2 | ||||
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 20 |
3 files changed, 15 insertions, 12 deletions
diff --git a/documentation/src/wayland.dox b/documentation/src/wayland.dox index 5a16311d6..d1ba01e00 100644 --- a/documentation/src/wayland.dox +++ b/documentation/src/wayland.dox @@ -636,6 +636,10 @@ is off and Wayland sends a final resize command which is not skipped. Overall, t ensures the client program resizes its window as frequently as it can without falling behind resize commands sent by the compositor. +To account for a bug in Mutter (issue #878), the \c window->buffer->cb object is +not created when a toplevel window is being resized and is entirely covered by +one subwindow. + <h3>Progressive window drawing</h3> FLTK supports progressive drawing when an app calls function Fl_Window::make_current() at any time and then calls the FLTK drawing API. This is made possible @@ -1280,6 +1284,7 @@ struct wld_window { int floating_width; // helps restoring size after un-maximizing int floating_height; int state; // indicates whether window is fullscreen, maximized. Used otherwise for POPUPs + bool covered; // specially for Mutter and issue #878 } </pre> diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.H b/src/drivers/Wayland/Fl_Wayland_Window_Driver.H index b3d530f00..680ef70b7 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.H +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.H @@ -163,7 +163,7 @@ struct wld_window { int floating_width; int floating_height; int state; - bool covered; + bool covered; // specially for Mutter and issue #878 }; diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index 637d47486..ac34952e0 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -1792,22 +1792,20 @@ int Fl_Wayland_Window_Driver::set_cursor_4args(const Fl_RGB_Image *rgb, int hotx // does win entirely cover its parent ? static void does_window_cover_parent(Fl_Window *win) { - if (win->parent()) { - Fl_Window *parent = win->window(); - if (win->x() <= 0 && win->y() <= 0 && win->w() >= parent->w() && - win->h() >= parent->h()) { - struct wld_window *xid = fl_wl_xid(parent); - xid->covered = true; - } - } + Fl_Window *parent = win->window(); + fl_wl_xid(parent)->covered = (win->x() <= 0 && win->y() <= 0 && + win->w() >= parent->w() && win->h() >= parent->h()); } -// recursively explore all subwindows in a window +// recursively explore all shown subwindows in a window and call f for each static void scan_subwindows(Fl_Group *g, void (*f)(Fl_Window *)) { for (int i = 0; i < g->children(); i++) { Fl_Widget *o = g->child(i); - if (o->as_window()) f(o->as_window()); + if (o->as_window()) { + if (!o->as_window()->shown()) continue; + f(o->as_window()); + } if (o->as_group()) scan_subwindows(o->as_group(), f); } } @@ -1910,7 +1908,7 @@ void Fl_Wayland_Window_Driver::resize(int X, int Y, int W, int H) { checkSubwindowFrame(); // make sure subwindow doesn't leak outside parent if (Fl_Wayland_Screen_Driver::compositor == Fl_Wayland_Screen_Driver::MUTTER && - !pWindow->parent()) { // fix for MUTTER bug described in issue #878 + fl_win && is_a_resize && fl_win->kind == DECORATED) { // fix for issue #878 scan_subwindows(pWindow, does_window_cover_parent); } } |
