[gnome-settings-daemon] Don't use GdkColormap
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] Don't use GdkColormap
- Date: Sat, 2 Oct 2010 08:59:01 +0000 (UTC)
commit b2c774acd2b3e39770b66140d1d07ecec8fdebdb
Author: William Jon McCann <jmccann redhat com>
Date: Wed Sep 29 19:18:37 2010 -0400
Don't use GdkColormap
https://bugzilla.gnome.org/show_bug.cgi?id=630975
plugins/common/gsd-osd-window.c | 13 ++++++++-----
plugins/mouse/gsd-locate-pointer.c | 10 +++++-----
2 files changed, 13 insertions(+), 10 deletions(-)
---
diff --git a/plugins/common/gsd-osd-window.c b/plugins/common/gsd-osd-window.c
index 18d70e6..223d6a9 100644
--- a/plugins/common/gsd-osd-window.c
+++ b/plugins/common/gsd-osd-window.c
@@ -378,17 +378,20 @@ gsd_osd_window_real_hide (GtkWidget *widget)
static void
gsd_osd_window_real_realize (GtkWidget *widget)
{
- GdkColormap *colormap;
GtkAllocation allocation;
GdkBitmap *mask;
cairo_t *cr;
+ GdkScreen *screen;
+ GdkVisual *visual;
- colormap = gdk_screen_get_rgba_colormap (gtk_widget_get_screen (widget));
-
- if (colormap != NULL) {
- gtk_widget_set_colormap (widget, colormap);
+ screen = gtk_widget_get_screen (widget);
+ visual = gdk_screen_get_rgba_visual (screen);
+ if (visual == NULL) {
+ visual = gdk_screen_get_system_visual (screen);
}
+ gtk_widget_set_visual (widget, visual);
+
if (GTK_WIDGET_CLASS (gsd_osd_window_parent_class)->realize) {
GTK_WIDGET_CLASS (gsd_osd_window_parent_class)->realize (widget);
}
diff --git a/plugins/mouse/gsd-locate-pointer.c b/plugins/mouse/gsd-locate-pointer.c
index cffce3f..820d3d3 100644
--- a/plugins/mouse/gsd-locate-pointer.c
+++ b/plugins/mouse/gsd-locate-pointer.c
@@ -232,23 +232,23 @@ static void
create_window (GsdLocatePointerData *data,
GdkScreen *screen)
{
- GdkColormap *colormap;
GdkVisual *visual;
GdkWindowAttr attributes;
gint attributes_mask;
- colormap = gdk_screen_get_rgba_colormap (screen);
visual = gdk_screen_get_rgba_visual (screen);
+ if (visual == NULL)
+ visual = gdk_screen_get_system_visual (screen);
+
attributes_mask = GDK_WA_X | GDK_WA_Y;
- if (colormap)
- attributes_mask = attributes_mask | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ if (visual != NULL)
+ attributes_mask = attributes_mask | GDK_WA_VISUAL;
attributes.window_type = GDK_WINDOW_TEMP;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = visual;
- attributes.colormap = colormap;
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK;
attributes.width = 1;
attributes.height = 1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]