diff options
author | Javier <dev.git@javispedro.com> | 2015-01-26 00:51:54 +0100 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2015-01-26 00:51:54 +0100 |
commit | 6f318affeb4d1c6ff66ccfa492713ad6f5e1e69c (patch) | |
tree | 52f86c68dcf6e26744d790a0fc566f9357a4b550 | |
parent | 9d610195bfaf1e51c713a8438c188bea032e4573 (diff) | |
download | mdock-6f318affeb4d1c6ff66ccfa492713ad6f5e1e69c.tar.gz mdock-6f318affeb4d1c6ff66ccfa492713ad6f5e1e69c.zip |
add a (possibly not necessary?) workaround for transparency
-rw-r--r-- | libmdock/mdock-item.c | 9 | ||||
-rw-r--r-- | libmdock/mdock-item.h | 2 | ||||
-rw-r--r-- | libmdock/mdock-widget.c | 6 | ||||
-rw-r--r-- | libmdock/mdock-widget.h | 2 | ||||
-rw-r--r-- | mate-applet/mdock-mate-panel-applet.c | 3 |
5 files changed, 22 insertions, 0 deletions
diff --git a/libmdock/mdock-item.c b/libmdock/mdock-item.c index 5b6e0f9..150af74 100644 --- a/libmdock/mdock-item.c +++ b/libmdock/mdock-item.c @@ -439,6 +439,15 @@ void mdock_item_close_all_windows(MDockItem *self) } } +void mdock_item_update_background(MDockItem *self) +{ + GtkWidget *widget = GTK_WIDGET(self); + GdkWindow *window = gtk_widget_get_window(widget); + g_return_if_fail(window); + gdk_window_set_back_pixmap(window, NULL, TRUE); + gtk_widget_queue_draw(widget); +} + void mdock_item_activate(MDockItem *self) { if (self->priv->windows) { diff --git a/libmdock/mdock-item.h b/libmdock/mdock-item.h index 7379687..739c966 100644 --- a/libmdock/mdock-item.h +++ b/libmdock/mdock-item.h @@ -73,6 +73,8 @@ gboolean mdock_item_has_windows(MDockItem *self); void mdock_item_close_all_windows(MDockItem *self); +void mdock_item_update_background(MDockItem *self); + void mdock_item_activate(MDockItem *self); G_END_DECLS diff --git a/libmdock/mdock-widget.c b/libmdock/mdock-widget.c index b202f8a..74467a3 100644 --- a/libmdock/mdock-widget.c +++ b/libmdock/mdock-widget.c @@ -877,6 +877,12 @@ gint mdock_widget_get_n_items(MDockWidget *self) return g_sequence_get_length(self->priv->items); } +void mdock_widget_update_background(MDockWidget *self) +{ + g_sequence_foreach(self->priv->items, + (GFunc)mdock_item_update_background, NULL); +} + GtkWidget *mdock_widget_new(void) { return GTK_WIDGET(g_object_new(MDOCK_TYPE_WIDGET, NULL)); diff --git a/libmdock/mdock-widget.h b/libmdock/mdock-widget.h index 2c49b04..e3d941f 100644 --- a/libmdock/mdock-widget.h +++ b/libmdock/mdock-widget.h @@ -53,6 +53,8 @@ GType mdock_widget_get_type(void); gint mdock_widget_get_n_items(MDockWidget *widget); +void mdock_widget_update_background(MDockWidget *widget); + GtkWidget *mdock_widget_new(void); GtkWidget *mdock_widget_new_with_settings(GSettings *settings); GtkWidget *mdock_widget_new_with_settings_path(const gchar *path); diff --git a/mate-applet/mdock-mate-panel-applet.c b/mate-applet/mdock-mate-panel-applet.c index 4b3f070..25a167e 100644 --- a/mate-applet/mdock-mate-panel-applet.c +++ b/mate-applet/mdock-mate-panel-applet.c @@ -137,6 +137,9 @@ static void mdock_mate_panel_applet_init(MDockMatePanelApplet *self) G_BINDING_DEFAULT, transform_prefs_path_to_gsettings, NULL, NULL, NULL); + g_signal_connect_object(self, "change-background", + G_CALLBACK(mdock_widget_update_background), self->dock, + G_CONNECT_SWAPPED); GtkActionGroup *action_group = gtk_action_group_new("MDock Mate Panel Applet Actions"); gtk_action_group_add_actions(action_group, |