Index: uspace/app/taskbar/wndlist.c
===================================================================
--- uspace/app/taskbar/wndlist.c	(revision 8eeffc12724890ee78571b31d0bac167386ceace)
+++ uspace/app/taskbar/wndlist.c	(revision d5f4459ba692b00d99d79ac8d052bbe4cb22265d)
@@ -232,5 +232,4 @@
 
 	entry->visible = false;
-	entry->maximized = true;
 
 	ui_pbutton_set_light(entry->button, active);
@@ -718,19 +717,24 @@
 {
 	wndlist_entry_t *entry = (wndlist_entry_t *)arg;
+	wndmgt_window_info_t *winfo = NULL;
 	sysarg_t dev_id;
+	errno_t rc;
+	bool minimized = false;
 
 	/* ID of device that clicked the button */
 	dev_id = entry->wndlist->ev_idev_id;
 
-	if (!entry->maximized) {
+	rc = wndmgt_get_window_info(entry->wndlist->wndmgt,
+	    entry->wnd_id, &winfo);
+	if (rc == EOK) {
+		minimized = (winfo->flags & wndf_minimized) == 0;
+	}
+
+	if (!minimized) {
 		(void) wndmgt_activate_window(entry->wndlist->wndmgt,
 	        dev_id, entry->wnd_id);
-
-		entry->maximized = true;
 	} else {
 		(void) wndmgt_deactivate_window(entry->wndlist->wndmgt,
 	        dev_id, entry->wnd_id);
-
-		entry->maximized = false;
 	}
 }
