[gtk+] Add a vfunc for gdk_window_set_composited
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Add a vfunc for gdk_window_set_composited
- Date: Tue, 21 Dec 2010 17:10:26 +0000 (UTC)
commit 7f6ac56e3c34a986f9c0f993f392381741ffdf23
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Dec 10 12:54:43 2010 -0500
Add a vfunc for gdk_window_set_composited
gdk/gdkwindow.c | 14 +++++++-------
gdk/gdkwindowimpl.h | 2 ++
gdk/x11/gdkwindow-x11.c | 7 ++++---
3 files changed, 13 insertions(+), 10 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 3938d30..32f6042 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -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);
diff --git a/gdk/gdkwindowimpl.h b/gdk/gdkwindowimpl.h
index 817e206..f3dbda1 100644
--- a/gdk/gdkwindowimpl.h
+++ b/gdk/gdkwindowimpl.h
@@ -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,
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 426c12f..5c3b684 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]