[gtk/gtk-3-22] gtkselection: ensure W32 functions used only for W32 displays (v2)



commit ff47cb0c519a0e24bfe2e9d80826ab2954cf3e42
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date:   Thu Apr 26 19:46:24 2018 +0000

    gtkselection: ensure W32 functions used only for W32 displays (v2)
    
    Another instance of a check needed for gdk_win32_selection_add_targets().

 gtk/gtkselection.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c
index 0a96cf372d..f0e36f312e 100644
--- a/gtk/gtkselection.c
+++ b/gtk/gtkselection.c
@@ -942,7 +942,8 @@ gtk_selection_add_target (GtkWidget     *widget,
     gdk_wayland_selection_add_targets (gtk_widget_get_window (widget), selection, 1, &target);
 #endif
 #ifdef GDK_WINDOWING_WIN32
-  gdk_win32_selection_add_targets (gtk_widget_get_window (widget), selection, 1, &target);
+  if (GDK_IS_WIN32_DISPLAY (gtk_widget_get_display (widget)))
+    gdk_win32_selection_add_targets (gtk_widget_get_window (widget), selection, 1, &target);
 #endif
 }
 


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