diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-08-15 18:40:11 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-08-15 18:40:11 +0200 |
| commit | 82fa5ea19c004c05723919daa96e3c2779af2aad (patch) | |
| tree | 81d86454376b9139b04f321a8884711b93055081 /src/drivers/Wayland | |
| parent | d325fa504e4a4e2a456a646a4159a43a8dfac4fd (diff) | |
Fix Fl_Wayland_Window_Driver::decoration_sizes().
Diffstat (limited to 'src/drivers/Wayland')
| -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 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() { |
