aboutsummaryrefslogtreecommitdiff
path: root/rootston/cursor.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-10-28 09:23:25 -0400
committerGitHub <noreply@github.com>2017-10-28 09:23:25 -0400
commitb3d5f1146c43c09edf5fa11ab125c8670d817883 (patch)
tree3c23eec87cff62bb90e856b1f4dc9a2f4ec0d968 /rootston/cursor.c
parentb97160238fa5b61fef81316102559c8c3e137cd2 (diff)
parentfb0c9a356e1b9e86f4b29d3be739e8b17c5771e9 (diff)
Merge pull request #349 from emersion/resize-bounds
Enforce resize bounds in rootston
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 ece115c4..27f97724 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) {