[Xfce4-commits] <xfce4-panel:xfce-4.8> Use the widget snapshot as tasklist draw icon.
Nick Schermer
noreply at xfce.org
Fri Feb 25 21:08:11 CET 2011
Updating branch refs/heads/xfce-4.8
to bd9cb2573fe6dfae0d5ff64aae9202b9fabb766a (commit)
from a0a3d318c8d688f505f4fefe2ce81c0fc48b5cef (commit)
commit bd9cb2573fe6dfae0d5ff64aae9202b9fabb766a
Author: Nick Schermer <nick at xfce.org>
Date: Sat Feb 19 20:25:30 2011 +0100
Use the widget snapshot as tasklist draw icon.
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 81e6877..0ff7db6 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);
More information about the Xfce4-commits
mailing list