diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-10-28 09:23:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-28 09:23:25 -0400 |
commit | b3d5f1146c43c09edf5fa11ab125c8670d817883 (patch) | |
tree | 3c23eec87cff62bb90e856b1f4dc9a2f4ec0d968 /rootston/cursor.c | |
parent | b97160238fa5b61fef81316102559c8c3e137cd2 (diff) | |
parent | fb0c9a356e1b9e86f4b29d3be739e8b17c5771e9 (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.c | 7 |
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) { |