Commit 7f6ac56e authored by Matthias Clasen's avatar Matthias Clasen

Add a vfunc for gdk_window_set_composited

parent 280e8329
......@@ -1780,13 +1780,11 @@ gdk_window_ensure_native (GdkWindow *window)
reparent_to_impl (window);
if (!window->input_only)
{
impl_class->set_background (window, window->background);
}
impl_class->set_background (window, window->background);
impl_class->input_shape_combine_region (window,
window->input_shape,
0, 0);
window->input_shape,
0, 0);
if (gdk_window_is_viewable (window))
impl_class->show (window, FALSE);
......@@ -7458,6 +7456,7 @@ gdk_window_set_composited (GdkWindow *window,
gboolean composited)
{
GdkDisplay *display;
GdkWindowImplClass *impl_class;
g_return_if_fail (GDK_IS_WINDOW (window));
......@@ -7474,11 +7473,12 @@ gdk_window_set_composited (GdkWindow *window,
if (!gdk_display_supports_composite (display) && composited)
{
g_warning ("gdk_window_set_composited called but "
"compositing is not supported");
"compositing is not supported");
return;
}
_gdk_windowing_window_set_composited (window, composited);
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
impl_class->set_composited (window, composited);
recompute_visible_regions (window, TRUE, FALSE);
......
......@@ -236,6 +236,8 @@ struct _GdkWindowImplClass
void (* configure_finished) (GdkWindow *window);
void (* set_opacity) (GdkWindow *window,
gdouble opacity);
void (* set_composited) (GdkWindow *window,
gboolean composited);
void (* destroy_notify) (GdkWindow *window);
void (* register_dnd) (GdkWindow *window);
GdkDragContext * (*drag_begin) (GdkWindow *window,
......
......@@ -4831,9 +4831,9 @@ gdk_x11_window_set_opacity (GdkWindow *window,
(guchar *) &cardinal, 1);
}
void
_gdk_windowing_window_set_composited (GdkWindow *window,
gboolean composited)
static void
gdk_x11_window_set_composited (GdkWindow *window,
gboolean composited)
{
#if defined(HAVE_XCOMPOSITE) && defined(HAVE_XDAMAGE) && defined (HAVE_XFIXES)
GdkWindowImplX11 *impl;
......@@ -5045,6 +5045,7 @@ gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass)
impl_class->enable_synchronized_configure = gdk_x11_window_enable_synchronized_configure;
impl_class->configure_finished = gdk_x11_window_configure_finished;
impl_class->set_opacity = gdk_x11_window_set_opacity;
impl_class->set_composited = gdk_x11_window_set_composited;
impl_class->destroy_notify = gdk_x11_window_destroy_notify;
impl_class->register_dnd = _gdk_x11_window_register_dnd;
impl_class->drag_begin = _gdk_x11_window_drag_begin;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment