Index: uspace/app/barber/barber.c
===================================================================
--- uspace/app/barber/barber.c	(revision d8bf1d8117b254069b81911f19447e80c7ce25d0)
+++ uspace/app/barber/barber.c	(revision 2c7fdaa52e822972ed823b3dc82058faf31a152b)
@@ -308,5 +308,6 @@
 	
 	winreg = argv[1];
-	window_t *main_window = window_open(argv[1], true, true, "barber");
+	window_t *main_window = window_open(argv[1],
+	    WINDOW_MAIN | WINDOW_DECORATED, "barber");
 	if (!main_window) {
 		printf("Cannot open main window.\n");
Index: uspace/app/fontviewer/fontviewer.c
===================================================================
--- uspace/app/fontviewer/fontviewer.c	(revision d8bf1d8117b254069b81911f19447e80c7ce25d0)
+++ uspace/app/fontviewer/fontviewer.c	(revision 2c7fdaa52e822972ed823b3dc82058faf31a152b)
@@ -260,5 +260,5 @@
 	}
 	
-	main_window = window_open(argv[1], true, false, "fontviewer");
+	main_window = window_open(argv[1], WINDOW_MAIN, "fontviewer");
 	if (!main_window) {
 		printf("Cannot open main window.\n");
Index: uspace/app/vdemo/vdemo.c
===================================================================
--- uspace/app/vdemo/vdemo.c	(revision d8bf1d8117b254069b81911f19447e80c7ce25d0)
+++ uspace/app/vdemo/vdemo.c	(revision 2c7fdaa52e822972ed823b3dc82058faf31a152b)
@@ -110,5 +110,6 @@
 {
 	if (argc >= 2) {
-		window_t *main_window = window_open(argv[1], true, true, "vdemo");
+		window_t *main_window = window_open(argv[1],
+		    WINDOW_MAIN | WINDOW_DECORATED | WINDOW_RESIZEABLE, "vdemo");
 		if (!main_window) {
 			printf("Cannot open main window.\n");
Index: uspace/app/viewer/viewer.c
===================================================================
--- uspace/app/viewer/viewer.c	(revision d8bf1d8117b254069b81911f19447e80c7ce25d0)
+++ uspace/app/viewer/viewer.c	(revision 2c7fdaa52e822972ed823b3dc82058faf31a152b)
@@ -167,5 +167,5 @@
 	}
 	
-	main_window = window_open(argv[1], true, false, "viewer");
+	main_window = window_open(argv[1], WINDOW_MAIN, "viewer");
 	if (!main_window) {
 		printf("Cannot open main window.\n");
Index: uspace/app/vlaunch/vlaunch.c
===================================================================
--- uspace/app/vlaunch/vlaunch.c	(revision d8bf1d8117b254069b81911f19447e80c7ce25d0)
+++ uspace/app/vlaunch/vlaunch.c	(revision 2c7fdaa52e822972ed823b3dc82058faf31a152b)
@@ -114,5 +114,6 @@
 	
 	winreg = argv[1];
-	window_t *main_window = window_open(argv[1], true, true, "vlaunch");
+	window_t *main_window = window_open(argv[1],
+	    WINDOW_MAIN | WINDOW_DECORATED | WINDOW_RESIZEABLE, "vlaunch");
 	if (!main_window) {
 		printf("Cannot open main window.\n");
Index: uspace/app/vterm/vterm.c
===================================================================
--- uspace/app/vterm/vterm.c	(revision d8bf1d8117b254069b81911f19447e80c7ce25d0)
+++ uspace/app/vterm/vterm.c	(revision 2c7fdaa52e822972ed823b3dc82058faf31a152b)
@@ -49,5 +49,6 @@
 	}
 	
-	window_t *main_window = window_open(argv[1], true, true, "vterm");
+	window_t *main_window = window_open(argv[1],
+	    WINDOW_MAIN | WINDOW_DECORATED, "vterm");
 	if (!main_window) {
 		printf("%s: Cannot open main window.\n", NAME);
Index: uspace/lib/c/generic/io/window.c
===================================================================
--- uspace/lib/c/generic/io/window.c	(revision d8bf1d8117b254069b81911f19447e80c7ce25d0)
+++ uspace/lib/c/generic/io/window.c	(revision 2c7fdaa52e822972ed823b3dc82058faf31a152b)
@@ -40,8 +40,9 @@
 #include <stdio.h>
 
-int win_register(async_sess_t *sess, service_id_t *in, service_id_t *out)
+int win_register(async_sess_t *sess, window_flags_t flags, service_id_t *in,
+    service_id_t *out)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
-	int ret = async_req_0_2(exch, WINDOW_REGISTER, in, out);
+	int ret = async_req_1_2(exch, WINDOW_REGISTER, flags, in, out);
 	async_exchange_end(exch);
 	
Index: uspace/lib/c/include/io/window.h
===================================================================
--- uspace/lib/c/include/io/window.h	(revision d8bf1d8117b254069b81911f19447e80c7ce25d0)
+++ uspace/lib/c/include/io/window.h	(revision 2c7fdaa52e822972ed823b3dc82058faf31a152b)
@@ -42,4 +42,10 @@
 #include <io/kbd_event.h>
 #include <io/pos_event.h>
+
+typedef enum {
+	WINDOW_MAIN = 1,
+	WINDOW_DECORATED = 2,
+	WINDOW_RESIZEABLE = 4
+} window_flags_t;
 
 typedef enum {
@@ -108,5 +114,6 @@
 } window_event_t;
 
-extern int win_register(async_sess_t *, service_id_t *, service_id_t *);
+extern int win_register(async_sess_t *, window_flags_t, service_id_t *,
+    service_id_t *);
 
 extern int win_get_event(async_sess_t *, window_event_t *);
Index: uspace/lib/gui/window.c
===================================================================
--- uspace/lib/gui/window.c	(revision d8bf1d8117b254069b81911f19447e80c7ce25d0)
+++ uspace/lib/gui/window.c	(revision 2c7fdaa52e822972ed823b3dc82058faf31a152b)
@@ -591,5 +591,5 @@
 }
 
-window_t *window_open(const char *winreg, bool is_main, bool is_decorated,
+window_t *window_open(const char *winreg, window_flags_t flags,
     const char *caption)
 {
@@ -598,6 +598,6 @@
 		return NULL;
 	
-	win->is_main = is_main;
-	win->is_decorated = is_decorated;
+	win->is_main = flags & WINDOW_MAIN;
+	win->is_decorated = flags & WINDOW_DECORATED;
 	win->is_focused = true;
 	prodcons_initialize(&win->events);
@@ -632,5 +632,5 @@
 	service_id_t in_dsid;
 	service_id_t out_dsid;
-	rc = win_register(reg_sess, &in_dsid, &out_dsid);
+	rc = win_register(reg_sess, flags, &in_dsid, &out_dsid);
 	async_hangup(reg_sess);
 	if (rc != EOK) {
Index: uspace/lib/gui/window.h
===================================================================
--- uspace/lib/gui/window.h	(revision d8bf1d8117b254069b81911f19447e80c7ce25d0)
+++ uspace/lib/gui/window.h	(revision 2c7fdaa52e822972ed823b3dc82058faf31a152b)
@@ -65,6 +65,7 @@
  * Allocate all resources for new window and register it in the compositor.
  * If the window is declared as main, its closure causes termination of the
- * whole application. Note that opened window does not have any surface yet. */
-extern window_t *window_open(const char *, bool, bool, const char *);
+ * whole application. Note that opened window does not have any surface yet.
+ */
+extern window_t *window_open(const char *, window_flags_t, const char *);
 
 /**
Index: uspace/srv/hid/compositor/compositor.c
===================================================================
--- uspace/srv/hid/compositor/compositor.c	(revision d8bf1d8117b254069b81911f19447e80c7ce25d0)
+++ uspace/srv/hid/compositor/compositor.c	(revision 2c7fdaa52e822972ed823b3dc82058faf31a152b)
@@ -90,4 +90,5 @@
 	link_t link;
 	atomic_t ref_cnt;
+	window_flags_t flags;
 	service_id_t in_dsid;
 	service_id_t out_dsid;
@@ -635,4 +636,11 @@
 	sysarg_t pos_id = IPC_GET_ARG1(*icall);
 	sysarg_t grab_flags = IPC_GET_ARG2(*icall);
+	
+	/*
+	 * Filter out resize grab flags if the window
+	 * is not resizeable.
+	 */
+	if ((win->flags & WINDOW_RESIZEABLE) != WINDOW_RESIZEABLE)
+		grab_flags &= ~(GF_RESIZE_X | GF_RESIZE_Y);
 
 	fibril_mutex_lock(&pointer_list_mtx);
@@ -903,4 +911,6 @@
 				return;
 			}
+			
+			win->flags = IPC_GET_ARG1(call);
 
 			char name_in[LOC_NAME_MAXLEN + 1];
@@ -1885,5 +1895,5 @@
 		fibril_mutex_lock(&window_list_mtx);
 		window_t *win = (window_t *) list_first(&window_list);
-		if (win && win->surface) {
+		if ((win) && (win->surface) && (win->flags & WINDOW_RESIZEABLE)) {
 			window_event_t *event = (window_event_t *) malloc(sizeof(window_event_t));
 			if (event == NULL) {
