[gimp/gimp-2-10] Issue #3481: Cannot paste images into GIMP copied from Telegram.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] Issue #3481: Cannot paste images into GIMP copied from Telegram.
- Date: Sun, 20 Sep 2020 17:29:40 +0000 (UTC)
commit 5ade6acb5607b943335c19fd97129c41730f9c94
Author: Jehan <jehan girinstud io>
Date: Sun Sep 20 19:25:04 2020 +0200
Issue #3481: Cannot paste images into GIMP copied from Telegram.
Adding patch by Massimo Valentini (@Massimo) for what is seemingly a bug
in GTK+2.24 in Windows.
The bug does not seem to happen on GIMP 3 (according to contributor
tests), so the bug/patch is likely not relevant anymore on GTK+3. So
let's just add this patch in our official GIMP build and be done with
it.
build/windows/patches/gtk+-2.24-issue-3481.patch | 38 ++++++++++++++++++++++++
1 file changed, 38 insertions(+)
---
diff --git a/build/windows/patches/gtk+-2.24-issue-3481.patch
b/build/windows/patches/gtk+-2.24-issue-3481.patch
new file mode 100644
index 0000000000..0cf35e93f6
--- /dev/null
+++ b/build/windows/patches/gtk+-2.24-issue-3481.patch
@@ -0,0 +1,38 @@
+diff --git a/gdk/win32/gdkselection-win32.c b/gdk/win32/gdkselection-win32.c
+index 0553b98d3c..0396a5a6b9 100644
+--- a/gdk/win32/gdkselection-win32.c
++++ b/gdk/win32/gdkselection-win32.c
+@@ -743,6 +743,7 @@ gdk_selection_convert (GdkWindow *requestor,
+ }
+ else if (selection == GDK_SELECTION_CLIPBOARD)
+ {
++ gchar *target_name;
+ gchar *mapped_target_name;
+ UINT fmt = 0;
+
+@@ -750,6 +751,7 @@ gdk_selection_convert (GdkWindow *requestor,
+ return;
+
+ mapped_target_name = get_mapped_gdk_atom_name (target);
++ target_name = gdk_atom_name (target);
+
+ /* Check if it's available. We could simply call
+ * GetClipboardData (RegisterClipboardFormat (targetname)), but
+@@ -762,7 +764,8 @@ gdk_selection_convert (GdkWindow *requestor,
+ char sFormat[80];
+
+ if (GetClipboardFormatName (fmt, sFormat, 80) > 0 &&
+- strcmp (sFormat, mapped_target_name) == 0)
++ (strcmp (sFormat, mapped_target_name) == 0 ||
++ strcmp (sFormat, target_name) == 0))
+ {
+ if ((hdata = GetClipboardData (fmt)) != NULL)
+ {
+@@ -784,6 +787,7 @@ gdk_selection_convert (GdkWindow *requestor,
+ }
+ }
+ }
++ g_free (target_name);
+ g_free (mapped_target_name);
+ API_CALL (CloseClipboard, ());
+ }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]