Skip to content
Permalink
Browse files
8217955: Problems with touch input and JavaFX 11
Reviewed-by: kcr, jvos
  • Loading branch information
Jose Pereda committed Apr 7, 2021
1 parent 9796a83 commit cc94e9674b126e648fe1e1f0eb06e198dd1e2606
@@ -742,7 +742,7 @@ grab_mouse_device(GdkDevice *device, DeviceGrabContext *context) {
context->window,
GDK_OWNERSHIP_NONE,
TRUE,
GDK_ALL_EVENTS_MASK,
GDK_FILTERED_EVENTS_MASK,
NULL,
GDK_CURRENT_TIME);
#else
@@ -752,7 +752,7 @@ grab_mouse_device(GdkDevice *device, DeviceGrabContext *context) {
context->window,
GDK_OWNERSHIP_NONE,
TRUE,
GDK_ALL_EVENTS_MASK,
GDK_FILTERED_EVENTS_MASK,
NULL,
GDK_CURRENT_TIME);
*/
@@ -42,6 +42,13 @@
#define GLASS_GTK3
#endif

#ifndef GDK_TOUCH_MASK
#define GDK_TOUCH_MASK (1 << 22)
#endif

#define GDK_FILTERED_EVENTS_MASK static_cast<GdkEventMask>(GDK_ALL_EVENTS_MASK \
& ~GDK_TOUCH_MASK)

#define JLONG_TO_PTR(value) ((void*)(intptr_t)(value))
#define PTR_TO_JLONG(value) ((jlong)(intptr_t)(value))

@@ -751,7 +751,7 @@ WindowContextTop::WindowContextTop(jobject _jwindow, WindowContext* _owner, long
}

gtk_widget_set_size_request(gtk_widget, 0, 0);
gtk_widget_set_events(gtk_widget, GDK_ALL_EVENTS_MASK);
gtk_widget_set_events(gtk_widget, GDK_FILTERED_EVENTS_MASK);
gtk_widget_set_app_paintable(gtk_widget, TRUE);
if (frame_type != TITLED) {
gtk_window_set_decorated(GTK_WINDOW(gtk_widget), FALSE);
@@ -761,6 +761,7 @@ WindowContextTop::WindowContextTop(jobject _jwindow, WindowContext* _owner, long
gtk_window_set_title(GTK_WINDOW(gtk_widget), "");

gdk_window = gtk_widget_get_window(gtk_widget);
gdk_window_set_events(gdk_window, GDK_FILTERED_EVENTS_MASK);

g_object_set_data_full(G_OBJECT(gdk_window), GDK_WINDOW_DATA_CONTEXT, this, NULL);

@@ -1543,12 +1544,13 @@ WindowContextPlug::WindowContextPlug(jobject _jwindow, void* _owner) :
g_signal_connect(G_OBJECT(gtk_widget), "configure-event", G_CALLBACK(plug_configure), this);

gtk_widget_set_size_request(gtk_widget, 0, 0);
gtk_widget_set_events(gtk_widget, GDK_ALL_EVENTS_MASK);
gtk_widget_set_events(gtk_widget, GDK_FILTERED_EVENTS_MASK);
gtk_widget_set_can_focus(GTK_WIDGET(gtk_widget), TRUE);
gtk_widget_set_app_paintable(gtk_widget, TRUE);

gtk_widget_realize(gtk_widget);
gdk_window = gtk_widget_get_window(gtk_widget);
gdk_window_set_events(gdk_window, GDK_FILTERED_EVENTS_MASK);

g_object_set_data_full(G_OBJECT(gdk_window), GDK_WINDOW_DATA_CONTEXT, this, NULL);
gdk_window_register_dnd(gdk_window);
@@ -1711,12 +1713,13 @@ WindowContextChild::WindowContextChild(jobject _jwindow,
glass_gtk_window_configure_from_visual(gtk_widget, visual);
}

gtk_widget_set_events(gtk_widget, GDK_ALL_EVENTS_MASK);
gtk_widget_set_events(gtk_widget, GDK_FILTERED_EVENTS_MASK);
gtk_widget_set_can_focus(GTK_WIDGET(gtk_widget), TRUE);
gtk_widget_set_app_paintable(gtk_widget, TRUE);
gtk_container_add (GTK_CONTAINER(parent_widget), gtk_widget);
gtk_widget_realize(gtk_widget);
gdk_window = gtk_widget_get_window(gtk_widget);
gdk_window_set_events(gdk_window, GDK_FILTERED_EVENTS_MASK);
g_object_set_data_full(G_OBJECT(gdk_window), GDK_WINDOW_DATA_CONTEXT, this, NULL);
gdk_window_register_dnd(gdk_window);
g_signal_connect(gtk_widget, "focus-in-event", G_CALLBACK(child_focus_callback), this);

1 comment on commit cc94e96

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on cc94e96 Apr 7, 2021

Please sign in to comment.