[maemo-commits] [maemo-commits] r19163 - in projects/haf/branches/gtk+/temp-rgba: gdk/x11 gtk
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Thu Aug 20 15:48:17 EEST 2009
- Previous message: [maemo-commits] r19162 - projects/haf/trunk/sapwood/debian
- Next message: [maemo-commits] r19164 - projects/haf/trunk/sapwood/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: herzi
Date: 2009-08-20 15:47:56 +0300 (Thu, 20 Aug 2009)
New Revision: 19163
Modified:
projects/haf/branches/gtk+/temp-rgba/gdk/x11/gdkwindow-x11.c
projects/haf/branches/gtk+/temp-rgba/gtk/gtktextview.c
projects/haf/branches/gtk+/temp-rgba/gtk/gtktreeview.c
projects/haf/branches/gtk+/temp-rgba/gtk/gtkviewport.c
Log:
use automatic compositing for rgb windows
Modified: projects/haf/branches/gtk+/temp-rgba/gdk/x11/gdkwindow-x11.c
===================================================================
--- projects/haf/branches/gtk+/temp-rgba/gdk/x11/gdkwindow-x11.c 2009-08-20 12:13:27 UTC (rev 19162)
+++ projects/haf/branches/gtk+/temp-rgba/gdk/x11/gdkwindow-x11.c 2009-08-20 12:47:56 UTC (rev 19163)
@@ -6145,6 +6145,9 @@
GdkDisplay *display;
Display *dpy;
Window xid;
+#ifdef MAEMO_CHANGES
+ int update = CompositeRedirectManual;
+#endif
impl = GDK_WINDOW_IMPL_X11 (private->impl);
@@ -6153,14 +6156,28 @@
dpy = GDK_DISPLAY_XDISPLAY (display);
xid = GDK_WINDOW_XWINDOW (private);
+#ifdef MAEMO_CHANGES
+ if (gdk_drawable_get_colormap (window) != gdk_screen_get_rgba_colormap (gdk_drawable_get_screen (window)))
+ {
+ update = CompositeRedirectAutomatic;
+ }
+#endif
if (composited)
{
+#ifndef MAEMO_CHANGES
XCompositeRedirectWindow (dpy, xid, CompositeRedirectManual);
+#else
+ XCompositeRedirectWindow (dpy, xid, update);
+#endif
impl->damage = XDamageCreate (dpy, xid, XDamageReportBoundingBox);
}
else
{
+#ifndef MAEMO_CHANGES
XCompositeUnredirectWindow (dpy, xid, CompositeRedirectManual);
+#else
+ XCompositeUnredirectWindow (dpy, xid, update);
+#endif
XDamageDestroy (dpy, impl->damage);
impl->damage = None;
}
Modified: projects/haf/branches/gtk+/temp-rgba/gtk/gtktextview.c
===================================================================
--- projects/haf/branches/gtk+/temp-rgba/gtk/gtktextview.c 2009-08-20 12:13:27 UTC (rev 19162)
+++ projects/haf/branches/gtk+/temp-rgba/gtk/gtktextview.c 2009-08-20 12:47:56 UTC (rev 19163)
@@ -3891,6 +3891,11 @@
gint attributes_mask;
GSList *tmp_list;
+#ifdef MAEMO_CHANGES
+ gtk_widget_set_colormap (widget,
+ gdk_screen_get_rgb_colormap (gtk_widget_get_screen (widget)));
+
+#endif
text_view = GTK_TEXT_VIEW (widget);
GTK_WIDGET_SET_FLAGS (text_view, GTK_REALIZED);
@@ -3900,13 +3905,8 @@
attributes.width = widget->allocation.width;
attributes.height = widget->allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
-#ifdef MAEMO_CHANGES
- attributes.colormap = gdk_screen_get_rgb_colormap (gtk_widget_get_screen (widget));
- attributes.visual = gdk_colormap_get_visual (attributes.colormap);
-#else
attributes.visual = gtk_widget_get_visual (widget);
attributes.colormap = gtk_widget_get_colormap (widget);
-#endif
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
Modified: projects/haf/branches/gtk+/temp-rgba/gtk/gtktreeview.c
===================================================================
--- projects/haf/branches/gtk+/temp-rgba/gtk/gtktreeview.c 2009-08-20 12:13:27 UTC (rev 19162)
+++ projects/haf/branches/gtk+/temp-rgba/gtk/gtktreeview.c 2009-08-20 12:47:56 UTC (rev 19163)
@@ -2063,6 +2063,10 @@
GdkWindowAttr attributes;
gint attributes_mask;
+#ifdef MAEMO_CHANGES
+ gtk_widget_set_colormap (widget,
+ gdk_screen_get_rgb_colormap (gtk_widget_get_screen (widget)));
+#endif
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
/* Make the main, clipping window */
Modified: projects/haf/branches/gtk+/temp-rgba/gtk/gtkviewport.c
===================================================================
--- projects/haf/branches/gtk+/temp-rgba/gtk/gtkviewport.c 2009-08-20 12:13:27 UTC (rev 19162)
+++ projects/haf/branches/gtk+/temp-rgba/gtk/gtkviewport.c 2009-08-20 12:47:56 UTC (rev 19163)
@@ -561,6 +561,10 @@
gint attributes_mask;
gint event_mask;
+#ifndef MAEMO_CHANGES
+ gtk_widget_set_colormap (widget,
+ gdk_screen_get_rgb_colormap (gtk_widget_get_screen (widget)));
+#endif
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
attributes.x = widget->allocation.x + border_width;
- Previous message: [maemo-commits] r19162 - projects/haf/trunk/sapwood/debian
- Next message: [maemo-commits] r19164 - projects/haf/trunk/sapwood/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
