From 3c9601d1a14a5db713cbe9d85bd7a025591cce6e Mon Sep 17 00:00:00 2001 From: Eric Koegel Date: Thu, 31 Oct 2013 20:49:40 +0300 Subject: [PATCH] Clear all pixels from drag highlight box (Bug 10450) Increase the length of the lines used to clear the drawing area in xfdesktop_icon_view_clear_drag_highlight. This way there's no artifacts left when the highlight box is supposed to be removed. --- src/xfdesktop-icon-view.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c index 345b400..f28e36a 100644 --- a/src/xfdesktop-icon-view.c +++ b/src/xfdesktop-icon-view.c @@ -1415,25 +1415,32 @@ xfdesktop_icon_view_clear_drag_highlight(XfdesktopIconView *icon_view, if(0 == cell_highlight->width || 0 == cell_highlight->height) return; + /* When dragging an icon a box is drawn to indicate the cell where the + * icon could be moved to if dropped. We need to clear that box but make + * the length of the lines slightly longer to clear all the pixels */ + /* Left vertical line */ gtk_widget_queue_draw_area(GTK_WIDGET(icon_view), cell_highlight->x - 1, - cell_highlight->y, + cell_highlight->y - 1, 2, - cell_highlight->height); + cell_highlight->height + 2); + /* Right vertical line */ gtk_widget_queue_draw_area(GTK_WIDGET(icon_view), cell_highlight->x + cell_highlight->width - 1, cell_highlight->y, 2, - cell_highlight->height); + cell_highlight->height + 2); + /* Top horizontal line */ gtk_widget_queue_draw_area(GTK_WIDGET(icon_view), cell_highlight->x, cell_highlight->y - 1, - cell_highlight->width, + cell_highlight->width + 2, 2); + /* Bottom horizontal line */ gtk_widget_queue_draw_area(GTK_WIDGET(icon_view), cell_highlight->x, cell_highlight->y + cell_highlight->height - 1, - cell_highlight->width, + cell_highlight->width + 2, 2); cell_highlight->width = cell_highlight->height = 0; -- 1.8.3.2