summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index b7c07a38b..d3df1494b 100644
--- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
@@ -953,25 +953,8 @@ static Fl_Window *calc_transient_parent(int &center_x, int &center_y) {
Fl_Window *top = Fl::first_window()->top_window();
while (top && top->user_data() == &Fl_Screen_Driver::transient_scale_display)
top = Fl::next_window(top);
- Fl_Window *target = top;
- // search if top's center belongs to one of its subwindows
center_x = top->w()/2; center_y = top->h()/2;
- while (target) {
- Fl_Window *child = Fl::first_window();
- while (child) {
- if (child->window() == target && child->user_data() != &Fl_Screen_Driver::transient_scale_display &&
- child->x() <= center_x && child->x()+child->w() > center_x &&
- child->y() <= center_y && child->y()+child->h() > center_y) {
- break; // child contains the center of top
- }
- child = Fl::next_window(child);
- }
- if (!child) break; // no more subwindow contains the center of top
- target = child;
- center_x -= child->x(); // express center coordinates relatively to child
- center_y -= child->y();
- }
- return target;
+ return top;
}
@@ -1084,7 +1067,6 @@ Fl_X *Fl_Wayland_Window_Driver::makeWindow()
float f = Fl::screen_scale(pWindow->top_window()->screen_num());
wl_subsurface_set_position(new_window->subsurface, pWindow->x() * f, pWindow->y() * f);
wl_subsurface_set_desync(new_window->subsurface); // important
- wl_subsurface_place_above(new_window->subsurface, parent->wl_surface);
// next 3 statements ensure the subsurface will be mapped because:
// "A sub-surface becomes mapped, when a non-NULL wl_buffer is applied and the parent surface is mapped."
new_window->configured_width = pWindow->w();