From: Rodolfo García Peñas (kix) Date: Sat, 10 Nov 2012 18:25:53 +0000 (+0100) Subject: wDockAttachIcon icon_editing is common in if else X-Git-Tag: wmaker-0.95.4~56 X-Git-Url: https://repo.or.cz/w/wmaker-crm.git/commitdiff_plain/6bc48464e9dff71ffa74767964e3121b6216735e 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). --- 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++)