FLTK logo

[master] 166a5bf - Update from libdecor source code (commit a735d056).

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] 166a5bf - Update from libdecor source code (commit a735d056). "ManoloFLTK" Sep 16, 2022  
 
commit 166a5bf785dab6b2319e0ac0711d8ce08e514b0c
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Fri Sep 16 17:26:00 2022 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Fri Sep 16 17:26:00 2022 +0200

    Update from libdecor source code (commit a735d056).

 libdecor/src/plugins/cairo/libdecor-cairo.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git libdecor/src/plugins/cairo/libdecor-cairo.c libdecor/src/plugins/cairo/libdecor-cairo.c
index aa46a0d..12af8aa 100644
--- libdecor/src/plugins/cairo/libdecor-cairo.c
+++ libdecor/src/plugins/cairo/libdecor-cairo.c
@@ -2363,6 +2363,7 @@ pointer_button(void *data,
 		}
 		else if (state == WL_POINTER_BUTTON_STATE_RELEASED &&
 			 frame_cairo->grab) {
+			libdecor_frame_ref(&frame_cairo->frame);
 			if (frame_cairo->grab == frame_cairo->focus) {
 				switch (frame_cairo->active->type) {
 				case BUTTON_MIN:
@@ -2374,16 +2375,8 @@ pointer_button(void *data,
 					toggle_maximized(&frame_cairo->frame);
 					break;
 				case BUTTON_CLOSE:
-#ifdef DONT_APPLY_FLTK_CHANGES
-                                    if (closeable(frame_cairo))
-                                            libdecor_frame_close(&frame_cairo->frame);
-#else
-                                        if (closeable(frame_cairo)) {
+					if (closeable(frame_cairo))
 						libdecor_frame_close(&frame_cairo->frame);
-                                                seat->pointer_focus = NULL;
-                                                return;
-                                        }
-#endif
 					break;
 				default:
 					break;
@@ -2391,6 +2384,7 @@ pointer_button(void *data,
 			}
 			frame_cairo->grab = NULL;
 			sync_active_component(frame_cairo, seat);
+			libdecor_frame_unref(&frame_cairo->frame);
 		}
 	}
 	else if (button == BTN_RIGHT &&
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'.