summaryrefslogtreecommitdiff
path: root/libmdock
diff options
context:
space:
mode:
Diffstat (limited to 'libmdock')
-rw-r--r--libmdock/mdock-item.c9
-rw-r--r--libmdock/mdock-item.h2
-rw-r--r--libmdock/mdock-widget.c6
-rw-r--r--libmdock/mdock-widget.h2
4 files changed, 19 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);