From 82fa5ea19c004c05723919daa96e3c2779af2aad Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 15 Aug 2022 18:40:11 +0200 Subject: Fix Fl_Wayland_Window_Driver::decoration_sizes(). --- src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index 3c4cb76b6..6a74dae04 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -577,12 +577,14 @@ void Fl_Wayland_Window_Driver::iconize() { void Fl_Wayland_Window_Driver::decoration_sizes(int *top, int *left, int *right, int *bottom) { - // Ensure border is on screen; these values are generic enough - // to work with many window managers, and are based on KDE defaults. - *top = 20; - *left = 4; - *right = 4; - *bottom = 8; + struct wld_window *xid = (struct wld_window*)fl_xid(pWindow); + if (xid && xid->kind == DECORATED) { + libdecor_frame_translate_coordinate(xid->frame, 0, 0, left, top); + *right = *left; + *bottom = 0; + } else { + Fl_Window_Driver::decoration_sizes(top, left, right, bottom); + } } void Fl_Wayland_Window_Driver::show_with_args_begin() { -- cgit v1.2.3