From bd410421d8f97bc8c3c984aa69b693d8415b3052 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 20 Aug 2014 21:35:02 +0200 Subject: [PATCH] gtkselection: Ensure the X11 specific message length only applies to X11 Other backends are compilable together with the X11 one, so the message lenght limit was applying to them all. https://bugzilla.gnome.org/show_bug.cgi?id=697855 --- gtk/gtkselection.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c index 1206b6827e..bd9d22b0d5 100644 --- a/gtk/gtkselection.c +++ b/gtk/gtkselection.c @@ -104,10 +104,12 @@ our buffers */ #ifdef GDK_WINDOWING_X11 #define GTK_SELECTION_MAX_SIZE(display) \ + GDK_IS_X11_DISPLAY (display) ? \ MIN(262144, \ XExtendedMaxRequestSize (GDK_DISPLAY_XDISPLAY (display)) == 0 \ ? XMaxRequestSize (GDK_DISPLAY_XDISPLAY (display)) - 100 \ - : XExtendedMaxRequestSize (GDK_DISPLAY_XDISPLAY (display)) - 100) + : XExtendedMaxRequestSize (GDK_DISPLAY_XDISPLAY (display)) - 100)\ + : G_MAXINT #else /* No chunks on Win32 */ #define GTK_SELECTION_MAX_SIZE(display) G_MAXINT