FLTK logo

[master] 1b0f21c - Wayland: support going from borderless to bordered window.

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

[master] 1b0f21c - Wayland: support going from borderless to bordered window. "ManoloFLTK" Sep 08, 2022  
 
commit 1b0f21cc8fec9a933770a2ed6d7feafe91ee8333
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Fri Sep 9 08:23:09 2022 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Fri Sep 9 08:23:09 2022 +0200

    Wayland: support going from borderless to bordered window.

 src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index 8a56067..928c5bb 100644
--- src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
@@ -1284,7 +1284,12 @@ void Fl_Wayland_Window_Driver::use_border() {
   pWindow->wait_for_expose(); // useful for border(0) just after show()
   struct libdecor_frame *frame = fl_wl_xid(pWindow)->frame;
   if (frame && Fl_Wayland_Screen_Driver::compositor != Fl_Wayland_Screen_Driver::KDE) {
-    libdecor_frame_set_visibility(frame, pWindow->border());
+    if (fl_wl_xid(pWindow)->kind == DECORATED) {
+      libdecor_frame_set_visibility(frame, pWindow->border());
+    } else {
+      pWindow->hide();
+      pWindow->show();
+    }
     pWindow->redraw();
   } else {
     Fl_Window_Driver::use_border();
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

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