console: do not resize buffer if size doesn't change
We shouldn't do anything if buffer_resize is called with the same size. This also suppresses useless "buffer resized to XxY" debug messages. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
1 parent
cf21453430
commit
d2e1f7d505
1 file changed
+3
@@ -345,6 +345,9 @@ int kmscon_buffer_resize(struct kmscon_buffer *buf, unsigned int x,
|
||||
if (!y)
|
||||
y = DEFAULT_HEIGHT;
|
||||
|
||||
if (buf->size_x == x && buf->size_y == y)
|
||||
return 0;
|
||||
|
||||
/* Resize y size by adjusting the current buffer size */
|
||||
if (y < buf->size_y) {
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user