mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[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:
parent
181b165a4b
commit
120fe63c0f
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user