aboutsummaryrefslogtreecommitdiff
path: root/rootston/cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'rootston/cursor.c')
-rw-r--r--rootston/cursor.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c
index 2cf90539..917e876c 100644
--- a/rootston/cursor.c
+++ b/rootston/cursor.c
@@ -160,6 +160,13 @@ void cursor_update_position(struct roots_input *input, uint32_t time) {
width += dx;
}
+ if (width < 0) {
+ width = 0;
+ }
+ if (height < 0) {
+ height = 0;
+ }
+
// TODO we might need one configure event for this
if (active_x != input->active_view->x ||
active_y != input->active_view->y) {