Index: uspace/app/taskbar/wndlist.c
===================================================================
--- uspace/app/taskbar/wndlist.c	(revision 65bf08437fcd848d357a9e3d4004b178ef9adafd)
+++ uspace/app/taskbar/wndlist.c	(revision 76f71b82b4276064f2fce7ba14d8ec1351602de8)
@@ -717,11 +717,25 @@
 {
 	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;
 
-	(void) wndmgt_activate_window(entry->wndlist->wndmgt,
-	    dev_id, entry->wnd_id);
+	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);
+	} else {
+		(void) wndmgt_deactivate_window(entry->wndlist->wndmgt,
+	        dev_id, entry->wnd_id);
+	}
 }
 
Index: uspace/lib/wndmgt/include/ipc/wndmgt.h
===================================================================
--- uspace/lib/wndmgt/include/ipc/wndmgt.h	(revision 65bf08437fcd848d357a9e3d4004b178ef9adafd)
+++ uspace/lib/wndmgt/include/ipc/wndmgt.h	(revision 76f71b82b4276064f2fce7ba14d8ec1351602de8)
@@ -43,4 +43,5 @@
 	WNDMGT_GET_WINDOW_INFO,
 	WNDMGT_ACTIVATE_WINDOW,
+	WNDMGT_DEACTIVATE_WINDOW,
 	WNDMGT_CLOSE_WINDOW,
 	WNDMGT_GET_EVENT,
Index: uspace/lib/wndmgt/include/wndmgt.h
===================================================================
--- uspace/lib/wndmgt/include/wndmgt.h	(revision 65bf08437fcd848d357a9e3d4004b178ef9adafd)
+++ uspace/lib/wndmgt/include/wndmgt.h	(revision 76f71b82b4276064f2fce7ba14d8ec1351602de8)
@@ -48,4 +48,5 @@
 extern void wndmgt_free_window_info(wndmgt_window_info_t *);
 extern errno_t wndmgt_activate_window(wndmgt_t *, sysarg_t, sysarg_t);
+extern errno_t wndmgt_deactivate_window(wndmgt_t *, sysarg_t, sysarg_t);
 extern errno_t wndmgt_close_window(wndmgt_t *, sysarg_t);
 
Index: uspace/lib/wndmgt/include/wndmgt_srv.h
===================================================================
--- uspace/lib/wndmgt/include/wndmgt_srv.h	(revision 65bf08437fcd848d357a9e3d4004b178ef9adafd)
+++ uspace/lib/wndmgt/include/wndmgt_srv.h	(revision 76f71b82b4276064f2fce7ba14d8ec1351602de8)
@@ -53,4 +53,5 @@
 	errno_t (*get_window_info)(void *, sysarg_t, wndmgt_window_info_t **);
 	errno_t (*activate_window)(void *, sysarg_t, sysarg_t);
+	errno_t (*deactivate_window)(void *, sysarg_t, sysarg_t);
 	errno_t (*close_window)(void *, sysarg_t);
 	errno_t (*get_event)(void *, wndmgt_ev_t *);
Index: uspace/lib/wndmgt/src/wndmgt.c
===================================================================
--- uspace/lib/wndmgt/src/wndmgt.c	(revision 65bf08437fcd848d357a9e3d4004b178ef9adafd)
+++ uspace/lib/wndmgt/src/wndmgt.c	(revision 76f71b82b4276064f2fce7ba14d8ec1351602de8)
@@ -308,4 +308,26 @@
 }
 
+/** Deactivate (minimize) window.
+ *
+ * @param wndmgt Window management session
+ * @param dev_id ID of input device belonging to seat whose
+ *               focus is to be switched
+ * @param wnd_id Window ID
+ * @return EOK on success or an error code
+ */
+errno_t wndmgt_deactivate_window(wndmgt_t *wndmgt, sysarg_t dev_id,
+    sysarg_t wnd_id)
+{
+	async_exch_t *exch;
+	errno_t rc;
+
+	exch = async_exchange_begin(wndmgt->sess);
+	rc = async_req_2_0(exch, WNDMGT_DEACTIVATE_WINDOW, dev_id,
+	    wnd_id);
+
+	async_exchange_end(exch);
+	return rc;
+}
+
 /** Close window.
  *
Index: uspace/lib/wndmgt/src/wndmgt_srv.c
===================================================================
--- uspace/lib/wndmgt/src/wndmgt_srv.c	(revision 65bf08437fcd848d357a9e3d4004b178ef9adafd)
+++ uspace/lib/wndmgt/src/wndmgt_srv.c	(revision 76f71b82b4276064f2fce7ba14d8ec1351602de8)
@@ -222,4 +222,22 @@
 }
 
+static void wndmgt_deactivate_window_srv(wndmgt_srv_t *srv, ipc_call_t *icall)
+{
+	sysarg_t dev_id;
+	sysarg_t wnd_id;
+	errno_t rc;
+
+	dev_id = ipc_get_arg1(icall);
+	wnd_id = ipc_get_arg2(icall);
+
+	if (srv->ops->deactivate_window == NULL) {
+		async_answer_0(icall, ENOTSUP);
+		return;
+	}
+
+	rc = srv->ops->deactivate_window(srv->arg, dev_id, wnd_id);
+	async_answer_0(icall, rc);
+}
+
 static void wndmgt_close_window_srv(wndmgt_srv_t *srv, ipc_call_t *icall)
 {
@@ -308,4 +326,7 @@
 		case WNDMGT_ACTIVATE_WINDOW:
 			wndmgt_activate_window_srv(srv, &call);
+			break;
+		case WNDMGT_DEACTIVATE_WINDOW:
+			wndmgt_deactivate_window_srv(srv, &call);
 			break;
 		case WNDMGT_CLOSE_WINDOW:
Index: uspace/srv/hid/display/wmops.c
===================================================================
--- uspace/srv/hid/display/wmops.c	(revision 65bf08437fcd848d357a9e3d4004b178ef9adafd)
+++ uspace/srv/hid/display/wmops.c	(revision 76f71b82b4276064f2fce7ba14d8ec1351602de8)
@@ -47,4 +47,5 @@
 static errno_t dispwm_get_window_info(void *, sysarg_t, wndmgt_window_info_t **);
 static errno_t dispwm_activate_window(void *, sysarg_t, sysarg_t);
+static errno_t dispwm_deactivate_window(void *, sysarg_t, sysarg_t);
 static errno_t dispwm_close_window(void *, sysarg_t);
 static errno_t dispwm_get_event(void *, wndmgt_ev_t *);
@@ -54,4 +55,5 @@
 	.get_window_info = dispwm_get_window_info,
 	.activate_window = dispwm_activate_window,
+	.deactivate_window = dispwm_deactivate_window,
 	.close_window = dispwm_close_window,
 	.get_event = dispwm_get_event,
@@ -189,4 +191,32 @@
 }
 
+/** Deactivate (minimize) window.
+ *
+ * @param arg Argument (WM client)
+ * @param dev_id Input device ID
+ * @param wnd_id Window ID
+ * @return EOK on success or an error code
+ */
+static errno_t dispwm_deactivate_window(void *arg, sysarg_t dev_id,
+    sysarg_t wnd_id)
+{
+	ds_wmclient_t *wmclient = (ds_wmclient_t *)arg;
+	ds_window_t *wnd;
+
+	log_msg(LOG_DEFAULT, LVL_DEBUG, "dispwm_deactivate_window()");
+
+	ds_display_lock(wmclient->display);
+	wnd = ds_display_find_window(wmclient->display, wnd_id);
+	if (wnd == NULL) {
+		ds_display_unlock(wmclient->display);
+		return ENOENT;
+	}
+
+	ds_window_minimize(wnd);
+
+	ds_display_unlock(wmclient->display);
+	return EOK;
+}
+
 /** Close window.
  *
