Index: uspace/lib/c/include/io/window.h
===================================================================
--- uspace/lib/c/include/io/window.h	(revision f698054997236318cb8677b2d580449dc643ca18)
+++ uspace/lib/c/include/io/window.h	(revision 290a0f0bca64b949d48d6b8a5d58988fc13ad577)
@@ -71,4 +71,6 @@
 	ET_POSITION_EVENT,
 	ET_SIGNAL_EVENT,
+	ET_WINDOW_FOCUS,
+	ET_WINDOW_UNFOCUS,
 	ET_WINDOW_RESIZE,
 	ET_WINDOW_REFRESH,
Index: uspace/lib/gui/window.c
===================================================================
--- uspace/lib/gui/window.c	(revision f698054997236318cb8677b2d580449dc643ca18)
+++ uspace/lib/gui/window.c	(revision 290a0f0bca64b949d48d6b8a5d58988fc13ad577)
@@ -66,6 +66,8 @@
 
 static pixel_t border_color = PIXEL(255, 0, 0, 0);
-static pixel_t header_bgcolor = PIXEL(255, 25, 25, 112);
-static pixel_t header_fgcolor = PIXEL(255, 255, 255, 255);
+static pixel_t header_bg_focus_color = PIXEL(255, 25, 25, 112);
+static pixel_t header_fg_focus_color = PIXEL(255, 255, 255, 255);
+static pixel_t header_bg_unfocus_color = PIXEL(255, 70, 130, 180);
+static pixel_t header_fg_unfocus_color = PIXEL(255, 255, 255, 255);
 
 static void paint_internal(widget_t *w)
@@ -94,5 +96,6 @@
 	    w->vpos + w->height - border_thickness, w->width, border_thickness);
 
-	source_set_color(&source, header_bgcolor);
+	source_set_color(&source, 
+	    w->window->is_focused ? header_bg_focus_color : header_bg_unfocus_color);
 	drawctx_transfer(&drawctx,
 	    w->hpos + border_thickness, w->vpos + border_thickness,
@@ -106,5 +109,6 @@
 	char cls_pict[] = "x";
 	font_get_box(&font, cls_pict, &cls_width, &cls_height);
-	source_set_color(&source, header_fgcolor);
+	source_set_color(&source, 
+	    w->window->is_focused ? header_fg_focus_color : header_fg_unfocus_color);
 	sysarg_t cls_x = ((close_width - cls_width) / 2) + w->hpos + w->width -
 	    border_thickness - close_width;
@@ -447,4 +451,8 @@
 			break;
 		case ET_POSITION_EVENT:
+			if (!win->is_focused) {
+				win->is_focused = true;
+				handle_refresh(win);
+			}
 			deliver_position_event(win, event->data.pos);
 			break;
@@ -454,4 +462,16 @@
 		case ET_WINDOW_RESIZE:
 			handle_resize(win, event->data.rsz.width, event->data.rsz.height);
+			break;
+		case ET_WINDOW_FOCUS:
+			if (!win->is_focused) {
+				win->is_focused = true;
+				handle_refresh(win);
+			}
+			break;
+		case ET_WINDOW_UNFOCUS:
+			if (win->is_focused) {
+				win->is_focused = false;
+				handle_refresh(win);
+			}
 			break;
 		case ET_WINDOW_REFRESH:
@@ -525,4 +545,5 @@
 	win->is_main = is_main;
 	win->is_decorated = is_decorated;
+	win->is_focused = true;
 	prodcons_initialize(&win->events);
 	fibril_mutex_initialize(&win->guard);
Index: uspace/lib/gui/window.h
===================================================================
--- uspace/lib/gui/window.h	(revision f698054997236318cb8677b2d580449dc643ca18)
+++ uspace/lib/gui/window.h	(revision 290a0f0bca64b949d48d6b8a5d58988fc13ad577)
@@ -50,4 +50,5 @@
 	bool is_main; /**< True for the main window of the application. */
 	bool is_decorated; /**< True if the window decorations should be rendered. */
+	bool is_focused; /**< True for the top level window of the desktop. */
 	char *caption; /**< Text title of the window header. */
 	async_sess_t *isess; /**< Input events from compositor. */
