mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-01-25 12:58:10 +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
1 changed files with 4 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
||||||
#include "texture.h"
|
#include "texture.h"
|
||||||
#include "shader.h"
|
#include "shader.h"
|
||||||
#include "model.h"
|
#include "model.h"
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
#include <stdatomic.h>
|
#include <stdatomic.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -332,6 +333,9 @@ struct CursorState egl_cursor_render(EGL_Cursor * cursor, LG_RendererRotate rota
|
||||||
assert(!"unreachable");
|
assert(!"unreachable");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
state.rect.x = max(0, state.rect.x);
|
||||||
|
state.rect.y = max(0, state.rect.y);
|
||||||
|
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
switch(cursor->type)
|
switch(cursor->type)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue