Index: uspace/lib/ui/src/window.c
===================================================================
--- uspace/lib/ui/src/window.c	(revision 06d0c81437c83c6c3cef6766e8e582c877832b47)
+++ uspace/lib/ui/src/window.c	(revision 2d879f7e702c10a9b3cc8fe266982c468d020f00)
@@ -59,4 +59,5 @@
 static void dwnd_kbd_event(void *, kbd_event_t *);
 static void dwnd_pos_event(void *, pos_event_t *);
+static void dwnd_resize_event(void *, gfx_rect_t *);
 static void dwnd_unfocus_event(void *);
 
@@ -66,4 +67,5 @@
 	.kbd_event = dwnd_kbd_event,
 	.pos_event = dwnd_pos_event,
+	.resize_event = dwnd_resize_event,
 	.unfocus_event = dwnd_unfocus_event
 };
@@ -71,8 +73,13 @@
 static void wd_close(ui_wdecor_t *, void *);
 static void wd_move(ui_wdecor_t *, void *, gfx_coord2_t *);
+static void wd_resize(ui_wdecor_t *, void *, ui_wdecor_rsztype_t,
+    gfx_coord2_t *);
+static void wd_set_cursor(ui_wdecor_t *, void *, ui_stock_cursor_t);
 
 static ui_wdecor_cb_t wdecor_cb = {
 	.close = wd_close,
-	.move = wd_move
+	.move = wd_move,
+	.resize = wd_resize,
+	.set_cursor = wd_set_cursor
 };
 
@@ -118,4 +125,6 @@
 	display_wnd_params_init(&dparams);
 	dparams.rect = params->rect;
+	/* Only allow making the window larger */
+	gfx_rect_dims(&params->rect, &dparams.min_size);
 
 	if (ui->display != NULL) {
@@ -175,5 +184,5 @@
 		goto error;
 
-	rc = ui_wdecor_create(res, params->caption, &wdecor);
+	rc = ui_wdecor_create(res, params->caption, params->style, &wdecor);
 	if (rc != EOK)
 		goto error;
@@ -185,7 +194,9 @@
 	window->ui = ui;
 	window->dwindow = dwindow;
+	window->rect = params->rect;
 	window->gc = gc;
 	window->res = res;
 	window->wdecor = wdecor;
+	window->cursor = ui_curs_arrow;
 	*rwindow = window;
 	return EOK;
@@ -435,4 +446,20 @@
 }
 
+/** Handle window resize event */
+static void dwnd_resize_event(void *arg, gfx_rect_t *rect)
+{
+	ui_window_t *window = (ui_window_t *) arg;
+
+	/* Make sure we don't process events until fully initialized */
+	if (window->wdecor == NULL)
+		return;
+
+	if ((window->wdecor->style & ui_wds_resizable) == 0)
+		return;
+
+	(void) ui_window_resize(window, rect);
+	(void) ui_window_paint(window);
+}
+
 /** Handle window unfocus event. */
 static void dwnd_unfocus_event(void *arg)
@@ -451,5 +478,5 @@
  *
  * @param wdecor Window decoration
- * @param arg Argument (demo)
+ * @param arg Argument (window)
  */
 static void wd_close(ui_wdecor_t *wdecor, void *arg)
@@ -463,5 +490,5 @@
  *
  * @param wdecor Window decoration
- * @param arg Argument (demo)
+ * @param arg Argument (window)
  * @param pos Position where the title bar was pressed
  */
@@ -471,4 +498,58 @@
 
 	(void) display_window_move_req(window->dwindow, pos);
+}
+
+/** Window decoration requested window resize.
+ *
+ * @param wdecor Window decoration
+ * @param arg Argument (window)
+ * @param rsztype Resize type
+ * @param pos Position where the button was pressed
+ */
+static void wd_resize(ui_wdecor_t *wdecor, void *arg,
+    ui_wdecor_rsztype_t rsztype, gfx_coord2_t *pos)
+{
+	ui_window_t *window = (ui_window_t *) arg;
+
+	(void) display_window_resize_req(window->dwindow, rsztype, pos);
+}
+
+/** Window decoration requested changing cursor.
+ *
+ * @param wdecor Window decoration
+ * @param arg Argument (window)
+ * @param cursor Cursor to set
+ */
+static void wd_set_cursor(ui_wdecor_t *wdecor, void *arg,
+    ui_stock_cursor_t cursor)
+{
+	ui_window_t *window = (ui_window_t *) arg;
+	display_stock_cursor_t dcursor;
+
+	if (cursor == window->cursor)
+		return;
+
+	dcursor = dcurs_arrow;
+
+	switch (cursor) {
+	case ui_curs_arrow:
+		dcursor = dcurs_arrow;
+		break;
+	case ui_curs_size_ud:
+		dcursor = dcurs_size_ud;
+		break;
+	case ui_curs_size_lr:
+		dcursor = dcurs_size_lr;
+		break;
+	case ui_curs_size_uldr:
+		dcursor = dcurs_size_uldr;
+		break;
+	case ui_curs_size_urdl:
+		dcursor = dcurs_size_urdl;
+		break;
+	}
+
+	(void) display_window_set_cursor(window->dwindow, dcursor);
+	window->cursor = cursor;
 }
 
