[gtk+/client-side-decorations: 37/50] remove the rgba stuff for now for firefox; temp hack for is_client_side_decorated
- From: Cody Russell <bratsche src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+/client-side-decorations: 37/50] remove the rgba stuff for now for firefox; temp hack for is_client_side_decorated
- Date: Wed, 8 Jul 2009 15:31:15 +0000 (UTC)
commit 589a07db37f9c67420b94146467af9a416945c92
Author: Cody Russell <crussell canonical com>
Date: Tue Jun 2 09:25:49 2009 -0500
remove the rgba stuff for now for firefox; temp hack for is_client_side_decorated
gtk/gtkwindow.c | 28 +++++++++++++++++++++-------
1 files changed, 21 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 8a6f406..f5137ab 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -822,7 +822,7 @@ gtk_window_class_init (GtkWindowClass *klass)
/* Style properties */
gtk_widget_class_install_style_property (widget_class,
- g_param_spec_boolean ("client-side-decorations",
+ g_param_spec_boolean ("client-side-decorated",
P_("Client-side window decorations"),
P_("Whether to decorate windows without the WM"),
FALSE,
@@ -971,7 +971,7 @@ gtk_window_class_init (GtkWindowClass *klass)
static void
gtk_window_init (GtkWindow *window)
{
- //GdkColormap *colormap;
+ GdkColormap *colormap;
GtkWindowPrivate *priv = GTK_WINDOW_GET_PRIVATE (window);
GtkWidget *label;
@@ -1024,11 +1024,14 @@ gtk_window_init (GtkWindow *window)
gtk_widget_show (label);
gtk_window_set_label_widget (window, label);
- //colormap = _gtk_widget_peek_colormap ();
- //if (colormap)
- // gtk_widget_set_colormap (GTK_WIDGET (window), colormap);
+#if 1
+ colormap = _gtk_widget_peek_colormap ();
+ if (colormap)
+ gtk_widget_set_colormap (GTK_WIDGET (window), colormap);
+#else
gtk_widget_set_colormap (GTK_WIDGET (window),
gdk_screen_get_rgba_colormap (gtk_widget_get_screen (GTK_WIDGET (window))));
+#endif
g_object_ref_sink (window);
window->has_user_ref_count = TRUE;
@@ -4983,9 +4986,15 @@ gtk_window_unmap (GtkWidget *widget)
static gboolean
is_client_side_decorated (GtkWindow *window)
{
- GtkWindowPrivate *priv = GTK_WINDOW_GET_PRIVATE (window);
+ gboolean client_side_decorated;
+
+ gtk_widget_style_get (GTK_WIDGET (window),
+ "client-side-decorated", &client_side_decorated,
+ NULL);
- return priv->client_side_decorated && window->decorated;
+ return 1 && window->decorated; // XXX - remove this :)
+
+ return client_side_decorated && window->decorated;
}
static void
@@ -7169,6 +7178,7 @@ gtk_window_paint (GtkWidget *widget,
{
GtkWindowPrivate *priv = GTK_WINDOW_GET_PRIVATE (widget);
+#if 0
if (is_client_side_decorated (GTK_WINDOW (widget)))
{
gtk_paint_box (widget->style, widget->window, GTK_STATE_NORMAL,
@@ -7179,6 +7189,10 @@ gtk_window_paint (GtkWidget *widget,
gtk_paint_flat_box (widget->style, widget->window, GTK_STATE_NORMAL,
GTK_SHADOW_NONE, area, widget, "base", 0, 0, -1, -1);
}
+#else
+ gtk_paint_flat_box (widget->style, widget->window, GTK_STATE_NORMAL,
+ GTK_SHADOW_NONE, area, widget, "base", 0, 0, -1, -1);
+#endif
}
static gint
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]