Enforce resize bounds in rootston

This commit is contained in:
emersion 2017-10-28 11:58:34 +02:00
parent b97160238f
commit fb0c9a356e
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
3 changed files with 40 additions and 0 deletions

View file

@ -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) {