< prev index next >

modules/javafx.graphics/src/main/native-glass/gtk/glass_dnd.cpp

Print this page

        

*** 32,42 **** #include <jni.h> #include <cstring> #include <gtk/gtk.h> #include <gdk/gdkx.h> - #include "glass_wrapper.h" #include <gdk/gdkkeysyms.h> /************************* COMMON *********************************************/ static jint translate_gdk_action_to_glass(GdkDragAction action) { --- 32,41 ----
*** 689,699 **** } mainEnv->CallVoidMethod(pixels, jPixelsAttachData, PTR_TO_JLONG(&pixbuf)); if (!EXCEPTION_OCCURED(mainEnv) ! && glass_gdk_pixbuf_save_to_buffer(pixbuf, &buffer, &size, type, NULL)) { gdk_property_change(requestor, property, target, 8, GDK_PROP_MODE_REPLACE, (guchar *)buffer, size); result = TRUE; } g_object_unref(pixbuf); --- 688,698 ---- } mainEnv->CallVoidMethod(pixels, jPixelsAttachData, PTR_TO_JLONG(&pixbuf)); if (!EXCEPTION_OCCURED(mainEnv) ! && gdk_pixbuf_save_to_buffer(pixbuf, &buffer, &size, type, NULL, NULL)) { gdk_property_change(requestor, property, target, 8, GDK_PROP_MODE_REPLACE, (guchar *)buffer, size); result = TRUE; } g_object_unref(pixbuf);
*** 786,798 **** static void process_dnd_source_selection_req(GdkWindow *window, GdkEventSelection* event) { (void)window; ! GdkWindow *requestor = gdk_x11_window_foreign_new_for_display( ! gdk_display_get_default(), ! event->requestor); gboolean is_data_set = FALSE; if (event->target == TARGET_UTF8_STRING_ATOM || event->target == TARGET_MIME_TEXT_PLAIN_ATOM) { is_data_set = dnd_source_set_utf8_string(requestor, event->property); --- 785,800 ---- static void process_dnd_source_selection_req(GdkWindow *window, GdkEventSelection* event) { (void)window; ! #ifdef GLASS_GTK3 ! GdkWindow *requestor = (event->requestor); ! #else ! GdkWindow *requestor = ! gdk_x11_window_foreign_new_for_display(gdk_display_get_default(), event->requestor); ! #endif gboolean is_data_set = FALSE; if (event->target == TARGET_UTF8_STRING_ATOM || event->target == TARGET_MIME_TEXT_PLAIN_ATOM) { is_data_set = dnd_source_set_utf8_string(requestor, event->property);
< prev index next >