[gtk+/wayland-selections: 4/15] gtkselection: Ensure the X11 specific message length only applies to X11



commit 3fa1ae9e05f860bc3993c566c7fd3c0407f445d3
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Aug 20 21:35:02 2014 +0200

    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.

 gtk/gtkselection.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c
index 1206b68..bd9d22b 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]