diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-05-10 20:26:53 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-05-10 20:26:53 +0200 |
| commit | 32b9c120f06721a72aed8b370c6e2c1244f0afee (patch) | |
| tree | 20e20b06d3fe0602af927716be1b04fa43185c71 /src/Fl_x.cxx | |
| parent | 7b76552d18b29abb5a7f587086f98e0b871f9c4c (diff) | |
Fix DnD from Wayland gnome app to X11 FLTK app
This DnD gives two data types of the dragged text: text and a gnome-specific type.
The code previously accepted DnD with 1 data type or 4 or more data types,
and processed situations with 2 or 3 data types in a special way that fails
with gnome source apps.
The new code processes situations with 2 and 3 data types just like other ones.
This works OK when dragging from gnome wayland apps.
Diffstat (limited to 'src/Fl_x.cxx')
| -rw-r--r-- | src/Fl_x.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 9495ae7a6..68f746033 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -1,7 +1,7 @@ // // X specific code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2023 by Bill Spitzak and others. +// Copyright 1998-2024 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -1600,7 +1600,7 @@ int fl_handle(const XEvent& thisevent) XGetWindowProperty(fl_display, fl_dnd_source_window, fl_XdndTypeList, 0, 0x8000000L, False, XA_ATOM, &actual, &format, &count, &remaining, &cm_buffer); - if (actual != XA_ATOM || format != 32 || (count<4 && count!=1) || !cm_buffer) { + if (actual != XA_ATOM || format != 32 || count <= 0 || !cm_buffer) { if ( cm_buffer ) { XFree(cm_buffer); cm_buffer = 0; } goto FAILED; } |
