Index: uspace/srv/hid/compositor/compositor.c
===================================================================
--- uspace/srv/hid/compositor/compositor.c	(revision 563573bd2bedf3f08471bc3d128902496941855e)
+++ uspace/srv/hid/compositor/compositor.c	(revision c8e2ac5930c0dca6c36bca54b1b7c7f3a36fa1e7)
@@ -286,7 +286,7 @@
 		sysarg_t y[4];
 		comp_coord_from_client(x_in, y_in, win_trans, &x[0], &y[0]);
-		comp_coord_from_client(x_in + w_in, y_in, win_trans, &x[1], &y[1]);
-		comp_coord_from_client(x_in + w_in, y_in + h_in, win_trans, &x[2], &y[2]);
-		comp_coord_from_client(x_in, y_in + h_in, win_trans, &x[3], &y[3]);
+		comp_coord_from_client(x_in + w_in - 1, y_in, win_trans, &x[1], &y[1]);
+		comp_coord_from_client(x_in + w_in - 1, y_in + h_in - 1, win_trans, &x[2], &y[2]);
+		comp_coord_from_client(x_in, y_in + h_in - 1, win_trans, &x[3], &y[3]);
 		(*x_out) = x[0];
 		(*y_out) = y[0];
@@ -555,5 +555,5 @@
 	} else {
 		fibril_mutex_lock(&window_list_mtx);
-		comp_coord_bounding_rect(x, y, width, height,
+		comp_coord_bounding_rect(x - 1, y - 1, width + 2, height + 2,
 		    win->transform, &x, &y, &width, &height);
 		fibril_mutex_unlock(&window_list_mtx);
@@ -1150,5 +1150,5 @@
 
 		if ((pointer->grab_flags & GF_SCALE_X) || (pointer->grab_flags & GF_RESIZE_X)) {
-			double fx = 1.0 + (_dx / (width * win->fx));
+			double fx = 1.0 + (_dx / ((width - 1) * win->fx));
 			if (fx > 0) {
 				win->fx *= fx;
@@ -1158,5 +1158,5 @@
 
 		if ((pointer->grab_flags & GF_SCALE_Y) || (pointer->grab_flags & GF_RESIZE_Y)) {
-			double fy = 1.0 + (_dy / (height * win->fy));
+			double fy = 1.0 + (_dy / ((height - 1) * win->fy));
 			if (fy > 0) {
 				win->fy *= fy;
@@ -1228,10 +1228,10 @@
 
 		if ((pointer->grab_flags & GF_SCALE_X) || (pointer->grab_flags & GF_RESIZE_X)) {
-			double fx = 1.0 + (_dx / (width * pointer->ghost.fx));
+			double fx = 1.0 + (_dx / ((width - 1) * pointer->ghost.fx));
 			pointer->ghost.fx *= fx;
 		}
 
 		if ((pointer->grab_flags & GF_SCALE_Y) || (pointer->grab_flags & GF_RESIZE_Y)) {
-			double fy = 1.0 + (_dy / (height * pointer->ghost.fy));
+			double fy = 1.0 + (_dy / ((height - 1) * pointer->ghost.fy));
 			pointer->ghost.fy *= fy;
 		}
