]> Pileus Git - ~andy/gtk/commitdiff
Add a vfunc for gdk_window_set_composited
authorMatthias Clasen <mclasen@redhat.com>
Fri, 10 Dec 2010 17:54:43 +0000 (12:54 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 21 Dec 2010 17:06:57 +0000 (12:06 -0500)
gdk/gdkwindow.c
gdk/gdkwindowimpl.h
gdk/x11/gdkwindow-x11.c

index 3938d30cbcc3c7388270e0138804d397877316c1..32f60422cf3f48174ebda10caf7c8da4d682a0f7 100644 (file)
@@ -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);
 
index 817e2060f73f90bf7f83a0a7bb0ad890b8187a5e..f3dbda19f2aab91cf55eec9dbe50cab4c29eb4a2 100644 (file)
@@ -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,
index 426c12f70a51914f5e4066f51ee3dfa8f95e86cf..5c3b6849dd70fd9e94de01d8854c0410ff3a5e9e 100644 (file)
@@ -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;