From 6bc48464e9dff71ffa74767964e3121b6216735e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Sat, 10 Nov 2012 19:25:53 +0100 Subject: [PATCH] wDockAttachIcon icon_editing is common in if else The line "icon_editing = 0" is the first line in the "if" sentence and the first (and only) sentence in the "else" block, so can be moved outside the if-else (and the empty else block can be removed). --- src/dock.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/dock.c b/src/dock.c index c90ae939..58ef31a3 100644 --- a/src/dock.c +++ b/src/dock.c @@ -1854,11 +1854,11 @@ Bool wDockAttachIcon(WDock *dock, WAppIcon *icon, int x, int y) int index; wwin = icon->icon->owner; + icon->editing = 0; + if (icon->command == NULL) { char *command; - icon->editing = 0; - command = GetCommandForWindow(wwin->client_win); if (command) { icon->command = command; @@ -1893,8 +1893,6 @@ Bool wDockAttachIcon(WDock *dock, WAppIcon *icon, int x, int y) } } } - } else { - icon->editing = 0; } for (index = 1; index < dock->max_icons; index++) -- 2.11.4.GIT