[gtk/wip/nirbheek/gtk-3-24-meson: 5/7] gtk: Fix paste/clipboard usage on macOS



commit c0df1f1f3fc7a3b905ba42308092c4f2de6f52d3
Author: Philippe Normand <phil base-art net>
Date:   Sun Nov 25 17:22:30 2018 +0000

    gtk: Fix paste/clipboard usage on macOS
    
    In Mojave the build fails because declareTypes is nil. Instead use the
    clearContents method, although I'm not really sure this is the same.

 gtk/gtkclipboard-quartz.c | 2 +-
 gtk/gtkdnd-quartz.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkclipboard-quartz.c b/gtk/gtkclipboard-quartz.c
index 8429c3c50f..783768fe2e 100644
--- a/gtk/gtkclipboard-quartz.c
+++ b/gtk/gtkclipboard-quartz.c
@@ -565,7 +565,7 @@ gtk_clipboard_clear (GtkClipboard *clipboard)
 {
   clipboard_unset (clipboard);
 
-  [clipboard->pasteboard declareTypes:nil owner:nil];
+  [clipboard clearContents];
 }
 
 static void
diff --git a/gtk/gtkdnd-quartz.c b/gtk/gtkdnd-quartz.c
index d92933a0e8..448bab5734 100644
--- a/gtk/gtkdnd-quartz.c
+++ b/gtk/gtkdnd-quartz.c
@@ -1606,7 +1606,7 @@ gtk_drag_source_info_destroy (GtkDragSourceInfo *info)
    * info->context after it has been destroyed.
    */
   pasteboard = [NSPasteboard pasteboardWithName: NSDragPboard];
-  [pasteboard declareTypes: nil owner: nil];
+  [pasteboard clearContents];
 
   [pool release];
 


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