[client] egl: keep x/y coordinates of cursor rectangle non-negative

This shifts the rectangles upwards instead of cutting off the rectangles,
but it keeps the code simple.
This commit is contained in:
Quantum 2021-07-25 12:35:03 -04:00 committed by Geoffrey McRae
parent 181b165a4b
commit 120fe63c0f

View File

@ -26,6 +26,7 @@
#include "texture.h"
#include "shader.h"
#include "model.h"
#include "util.h"
#include <stdatomic.h>
#include <stdlib.h>
@ -332,6 +333,9 @@ struct CursorState egl_cursor_render(EGL_Cursor * cursor, LG_RendererRotate rota
assert(!"unreachable");
}
state.rect.x = max(0, state.rect.x);
state.rect.y = max(0, state.rect.y);
glEnable(GL_BLEND);
switch(cursor->type)
{