FLTK logo

[master] 3cf9390 - Wayland: stop calling non-public libdecor_frame_get_content_{width,height} (#1296)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Library      Forums      Links      Apps     Login 
[  All Forums  |  Back to fltk.commit  ]
 
[ Previous Message ] [ Next Message ]

[master] 3cf9390 - Wayland: stop calling non-public libdecor_frame_get_content_{width,height} (#1296) "ManoloFLTK" Aug 20, 2025  
 
commit 3cf9390e9e4ce8961a4482138004a678f1b49097
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Wed Aug 20 08:59:41 2025 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Wed Aug 20 08:59:41 2025 +0200

    Wayland: stop calling non-public libdecor_frame_get_content_{width,height} (#1296)

 src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index 6026db2..5cba874 100644
--- src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
@@ -910,16 +910,17 @@ static void handle_configure(struct libdecor_frame *frame,
   }
   window->state = window_state;
 
-  // Weston, KWin, and some versions of Mutter, on purpose, don't set the
+  // Weston, KWin, and some old versions of Mutter, on purpose, don't set the
   // window width x height when xdg_toplevel_configure runs twice
   // during resizable window creation
   // (see https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/6).
   // Consequently, libdecor_configuration_get_content_size() may return false twice.
-  // In that case libdecor_frame_get_content_{width,height}() give the desired window size
+  // Weston and KWin, at least, don't change the window size asked by the client application
+  // which is available here in floating_{width,height}.
   if (!libdecor_configuration_get_content_size(configuration, frame, &width, &height)) {
     if (is_2nd_run) {
-      width = libdecor_frame_get_content_width(frame);
-      height = libdecor_frame_get_content_height(frame);
+      width = window->floating_width;
+      height = window->floating_height;
       if (!driver->is_resizable()) {
         libdecor_frame_set_min_content_size(frame, width, height);
         libdecor_frame_set_max_content_size(frame, width, height);
[ Direct Link to Message ]
 
     
[ Previous Message ] [ Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2026 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.