diff options
author | Nick Schermer <nick@xfce.org> | 2011-02-19 20:25:30 +0100 |
---|---|---|
committer | Nick Schermer <nick@xfce.org> | 2011-02-25 21:05:51 +0100 |
commit | bd9cb2573fe6dfae0d5ff64aae9202b9fabb766a (patch) | |
tree | 30e11b22cbeef42a80d90a296ab181c113982d28 | |
parent | a0a3d318c8d688f505f4fefe2ce81c0fc48b5cef (diff) |
Use the widget snapshot as tasklist draw icon.
-rw-r--r-- | plugins/tasklist/tasklist-widget.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c index 81e6877b..0ff7db64 100644 --- a/plugins/tasklist/tasklist-widget.c +++ b/plugins/tasklist/tasklist-widget.c @@ -2819,9 +2819,24 @@ xfce_tasklist_button_drag_begin (GtkWidget *button, XfceTasklistChild *child) { GdkPixbuf *pixbuf; + GdkPixmap *pixmap; panel_return_if_fail (WNCK_IS_WINDOW (child->window)); + if (child->tasklist->show_labels) + { + pixmap = gtk_widget_get_snapshot (button, NULL); + if (pixmap != NULL) + { + gtk_drag_set_icon_pixmap (context, + gdk_drawable_get_colormap (GDK_DRAWABLE (pixmap)), + pixmap, NULL, 0, 0); + g_object_unref (G_OBJECT (pixmap)); + + return; + } + } + pixbuf = wnck_window_get_icon (child->window); if (G_LIKELY (pixbuf != NULL)) gtk_drag_set_icon_pixbuf (context, pixbuf, 0, 0); |