diff options
author | Denis Gorodnichev <[email protected]> | 2014-02-26 12:46:21 +0400 |
---|---|---|
committer | Denis Gorodnichev <[email protected]> | 2014-02-26 12:48:40 +0400 |
commit | e1535f260bfb46463e2c41a01a6f9e0151e7941f (patch) | |
tree | 173e8574fd322273be0633406480a50455bc2f0c | |
parent | 485659f39620e77960d6e7b1e6ca835eade17ba6 (diff) | |
download | mate-panel-e1535f260bfb46463e2c41a01a6f9e0151e7941f.tar.bz2 mate-panel-e1535f260bfb46463e2c41a01a6f9e0151e7941f.tar.xz |
gtk3: rgba visual
-rw-r--r-- | mate-panel/panel-toplevel.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mate-panel/panel-toplevel.c b/mate-panel/panel-toplevel.c index 6df4f9b8..0132d436 100644 --- a/mate-panel/panel-toplevel.c +++ b/mate-panel/panel-toplevel.c @@ -4105,6 +4105,26 @@ panel_toplevel_get_property (GObject *object, } } +static GObject* +panel_toplevel_constructor (GType type, + guint n_construct_properties, + GObjectConstructParam *construct_properties) +{ + GObject *object; + + object = G_OBJECT_CLASS (panel_toplevel_parent_class)->constructor (type, + n_construct_properties, + construct_properties); +#if GTK_CHECK_VERSION (3, 0, 0) + PanelToplevel *toplevel = PANEL_TOPLEVEL(object); + GdkScreen *screen = gtk_widget_get_screen(GTK_WIDGET(toplevel)); + GdkVisual *visual = gdk_screen_get_rgba_visual(screen); + gtk_widget_set_visual(GTK_WIDGET(toplevel), visual); +#endif + + return object; +} + static void panel_toplevel_finalize (GObject *object) { @@ -4169,6 +4189,7 @@ panel_toplevel_class_init (PanelToplevelClass *klass) binding_set = gtk_binding_set_by_class (klass); + gobject_class->constructor = panel_toplevel_constructor; gobject_class->set_property = panel_toplevel_set_property; gobject_class->get_property = panel_toplevel_get_property; gobject_class->finalize = panel_toplevel_finalize; |