diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-07-01 17:02:27 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-07-01 17:02:27 +0200 |
| commit | b5516449a687f8493e5fd9682511e9611a5b4fb7 (patch) | |
| tree | 68dc25f67389d0c8bac6dd2ac2ccc3f2e7df61f5 /src/drivers | |
| parent | b55dc47aaed32f7f44cd2ded9836302d791875d6 (diff) | |
Wayland: fix interactive moving and resizing of a subwindow - cont'd (#987)
This commit removes changes in class Fl_Group introduced in 1c6a0c1.
Diffstat (limited to 'src/drivers')
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index 21a02c8f4..8f8eb12b8 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -1459,8 +1459,10 @@ void Fl_Wayland_Window_Driver::makeWindow() // the state of the parent surface is applied." new_window->configured_width = pWindow->w(); new_window->configured_height = pWindow->h(); - parent->fl_win->wait_for_expose(); - wl_surface_commit(parent->wl_surface); + if (!pWindow->as_gl_window()) { + parent->fl_win->wait_for_expose(); + wl_surface_commit(parent->wl_surface); + } wait_for_expose_value = 0; pWindow->border(0); checkSubwindowFrame(); // make sure subwindow doesn't leak outside parent @@ -1791,9 +1793,9 @@ void Fl_Wayland_Window_Driver::resize(int X, int Y, int W, int H) { X = Y = 0; } struct wld_window *parent_xid = parent() ? fl_wl_xid(pWindow->window()) : NULL; - // This condition excludes moving or resizing a subwindow while not changing its parent - // and delays application of new X,Y,W,H values if the parent is being committed. - if (true_rescale || !parent_xid || group_resize_depth() >= 1 || !parent_xid->frame_cb) { + // This condition delays application of new X,Y,W,H values if + // a non-GL subwindow is being committed. + if (!parent_xid || !parent_xid->frame_cb || pWindow->as_gl_window()) { if (is_a_resize) { if (pWindow->parent()) { if (W < 1) W = 1; @@ -1864,7 +1866,7 @@ void Fl_Wayland_Window_Driver::resize(int X, int Y, int W, int H) { } if (fl_win && parent_xid) { - if (group_resize_depth() < 1 && !parent_xid->frame_cb) { + if (!parent_xid->frame_cb && !pWindow->as_gl_window()) { // Interactive move or resize of a subwindow requires to commit the parent surface // and requires to make sure the parent surface is ready to accept a new commit (#987). parent_xid->frame_cb = wl_surface_frame(parent_xid->wl_surface); |
