static void
gdk_broadway_display_init (GdkBroadwayDisplay *display)
{
+ gdk_display_set_input_shapes (GDK_DISPLAY (display), FALSE);
+
display->id_ht = g_hash_table_new (NULL, NULL);
display->monitor = g_object_new (GDK_TYPE_BROADWAY_MONITOR,
{
}
-static gboolean
-gdk_broadway_display_supports_input_shapes (GdkDisplay *display)
-{
- return FALSE;
-}
-
static gulong
gdk_broadway_display_get_next_serial (GdkDisplay *display)
{
display_class->has_pending = gdk_broadway_display_has_pending;
display_class->queue_events = _gdk_broadway_display_queue_events;
display_class->get_default_group = gdk_broadway_display_get_default_group;
- display_class->supports_input_shapes = gdk_broadway_display_supports_input_shapes;
display_class->get_next_serial = gdk_broadway_display_get_next_serial;
display_class->notify_startup_complete = gdk_broadway_display_notify_startup_complete;
PROP_0,
PROP_COMPOSITED,
PROP_RGBA,
+ PROP_INPUT_SHAPES,
LAST_PROP
};
g_value_set_boolean (value, gdk_display_is_rgba (display));
break;
+ case PROP_INPUT_SHAPES:
+ g_value_set_boolean (value, gdk_display_supports_input_shapes (display));
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
TRUE,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+ /**
+ * GdkDisplay:input-shapes:
+ *
+ * %TRUE if the display supports input shapes. See
+ * gdk_display_supports_input_shapes() for details.
+ */
+ props[PROP_INPUT_SHAPES] =
+ g_param_spec_boolean ("input-shapes",
+ P_("Input shapes"),
+ P_("Input shapes"),
+ TRUE,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+
g_object_class_install_properties (object_class, LAST_PROP, props);
/**
display->composited = TRUE;
display->rgba = TRUE;
+ display->input_shapes = TRUE;
}
static void
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
- return GDK_DISPLAY_GET_CLASS (display)->supports_input_shapes (display);
+ return display->input_shapes;
+}
+
+void
+gdk_display_set_input_shapes (GdkDisplay *display,
+ gboolean input_shapes)
+{
+ g_return_if_fail (GDK_IS_DISPLAY (display));
+
+ if (display->input_shapes == input_shapes)
+ return;
+
+ display->input_shapes = input_shapes;
+
+ g_object_notify_by_pspec (G_OBJECT (display), props[PROP_INPUT_SHAPES]);
}
static GdkAppLaunchContext *
gboolean gdk_display_is_composited (GdkDisplay *display);
GDK_AVAILABLE_IN_ALL
gboolean gdk_display_is_rgba (GdkDisplay *display);
+GDK_AVAILABLE_IN_ALL
+gboolean gdk_display_supports_input_shapes (GdkDisplay *display);
GDK_AVAILABLE_IN_ALL
GdkEvent* gdk_display_get_event (GdkDisplay *display);
GDK_AVAILABLE_IN_ALL
GdkClipboard * gdk_display_get_primary_clipboard (GdkDisplay *display);
-GDK_AVAILABLE_IN_ALL
-gboolean gdk_display_supports_input_shapes (GdkDisplay *display);
GDK_AVAILABLE_IN_ALL
void gdk_display_notify_startup_complete (GdkDisplay *display,
const gchar *startup_id);
#endif /* GDK_RENDERING_VULKAN */
guint rgba : 1;
guint composited : 1;
+ guint input_shapes : 1;
GdkDebugFlags debug_flags;
void (*queue_events) (GdkDisplay *display);
void (*make_default) (GdkDisplay *display);
GdkSurface * (*get_default_group) (GdkDisplay *display);
- gboolean (*supports_input_shapes) (GdkDisplay *display);
GdkAppLaunchContext * (*get_app_launch_context) (GdkDisplay *display);
gboolean rgba);
void gdk_display_set_composited (GdkDisplay *display,
gboolean composited);
+void gdk_display_set_input_shapes (GdkDisplay *display,
+ gboolean input_shapes);
void gdk_display_add_seat (GdkDisplay *display,
GdkSeat *seat);
return NULL;
}
-static gboolean
-gdk_wayland_display_supports_input_shapes (GdkDisplay *display)
-{
- return TRUE;
-}
-
static gulong
gdk_wayland_display_get_next_serial (GdkDisplay *display)
{
display_class->has_pending = gdk_wayland_display_has_pending;
display_class->queue_events = _gdk_wayland_display_queue_events;
display_class->get_default_group = gdk_wayland_display_get_default_group;
- display_class->supports_input_shapes = gdk_wayland_display_supports_input_shapes;
display_class->get_app_launch_context = _gdk_wayland_display_get_app_launch_context;
display_class->get_next_serial = gdk_wayland_display_get_next_serial;
display_class->get_startup_notification_id = gdk_wayland_display_get_startup_notification_id;
return NULL;
}
-static gboolean
-gdk_win32_display_supports_input_shapes (GdkDisplay *display)
-{
- g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
-
- /* Partially supported, see WM_NCHITTEST handler. */
- return TRUE;
-}
-
static void
gdk_win32_display_beep (GdkDisplay *display)
{
display_class->queue_events = _gdk_win32_display_queue_events;
display_class->get_default_group = gdk_win32_display_get_default_group;
- display_class->supports_input_shapes = gdk_win32_display_supports_input_shapes;
-
//? display_class->get_app_launch_context = _gdk_win32_display_get_app_launch_context;
display_class->get_next_serial = gdk_win32_display_get_next_serial;
#endif
}
+ gdk_display_set_input_shapes (display, display_x11->have_input_shapes);
+
display_x11->trusted_client = TRUE;
{
Window root, child;
return GDK_X11_DISPLAY (display)->user_time;
}
-static gboolean
-gdk_x11_display_supports_input_shapes (GdkDisplay *display)
-{
- return GDK_X11_DISPLAY (display)->have_input_shapes;
-}
-
-
/**
* gdk_x11_display_get_startup_notification_id:
* @display: (type GdkX11Display): a #GdkDisplay
display_class->has_pending = gdk_x11_display_has_pending;
display_class->queue_events = _gdk_x11_display_queue_events;
display_class->get_default_group = gdk_x11_display_get_default_group;
- display_class->supports_input_shapes = gdk_x11_display_supports_input_shapes;
display_class->get_app_launch_context = _gdk_x11_display_get_app_launch_context;
display_class->get_next_serial = gdk_x11_display_get_next_serial;