FLTK logo

[master] d215dde - Fix for issue #412 for the Wayland backend

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] d215dde - Fix for issue #412 for the Wayland backend "ManoloFLTK" Nov 23, 2022  
 
commit d215ddef811aaf7f8452d866e9c67df35f836bd2
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Wed Nov 23 09:33:41 2022 +0100
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Wed Nov 23 09:33:41 2022 +0100

    Fix for issue #412 for the Wayland backend
    
    The problem was that after a drag-n-drop within a window, text selection
    by shift+arrow key stopped working.
    
    Also, improves drag-n-drop within a window by leaving insertion point
    at end of dragged text.

 src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx
index 7ede425..bd09c44 100644
--- src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx
+++ src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx
@@ -115,7 +115,7 @@ static void data_source_handle_cancelled(void *data, struct wl_data_source *sour
       save_cursor = NULL;
     }
     if (fl_dnd_target_window) {
-      Fl::handle(FL_DND_LEAVE, fl_dnd_target_window);
+      Fl::handle(FL_RELEASE, fl_dnd_target_window);
       fl_dnd_target_window = 0;
     }
     Fl::pushed(0);
@@ -454,7 +454,7 @@ static void data_device_handle_motion(void *data, struct wl_data_device *data_de
 
 static void data_device_handle_leave(void *data, struct wl_data_device *data_device) {
 //printf("Drag left our surface\n");
-  Fl::handle(FL_DND_LEAVE, fl_dnd_target_window);
+if (current_drag_offer)  Fl::handle(FL_DND_LEAVE, fl_dnd_target_window);
 }
 
 
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'.