[gtk+/rendering-cleanup: 110/142] trayicon: Use XClearArea
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup: 110/142] trayicon: Use XClearArea
- Date: Thu, 9 Sep 2010 16:13:32 +0000 (UTC)
commit 02953aff84e5548d82ba1ef2dcd816374b17eb07
Author: Benjamin Otte <otte redhat com>
Date: Sat Aug 28 20:24:28 2010 +0200
trayicon: Use XClearArea
gdk_window_clear_area() isn't smart enough to clear to a parent pixmap
that is part of a window that GDK doesn't manage.
gtk/gtktrayicon-x11.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtktrayicon-x11.c b/gtk/gtktrayicon-x11.c
index ef15eb7..eb22fd4 100644
--- a/gtk/gtktrayicon-x11.c
+++ b/gtk/gtktrayicon-x11.c
@@ -331,9 +331,14 @@ gtk_tray_icon_expose (GtkWidget *widget,
}
else
{
- /* Clear to parent-relative pixmap */
- gdk_window_clear_area (window, event->area.x, event->area.y,
- event->area.width, event->area.height);
+ /* Clear to parent-relative pixmap
+ * We need to use direct X access here because GDK doesn't know about
+ * the parent realtive pixmap. */
+ XClearArea (GDK_WINDOW_XDISPLAY (window),
+ GDK_WINDOW_XID (window),
+ event->area.x, event->area.y,
+ event->area.width, event->area.height,
+ False);
}
if (GTK_WIDGET_CLASS (gtk_tray_icon_parent_class)->expose_event)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]