mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[client] egl: increase the damage box for the cursor
This commit is contained in:
parent
3e9a21d3b9
commit
58f83da7bb
@ -304,37 +304,37 @@ struct CursorState egl_cursorRender(EGL_Cursor * cursor,
|
|||||||
case LG_ROTATE_0:
|
case LG_ROTATE_0:
|
||||||
state.rect.x = (pos.x * width + width) / 2;
|
state.rect.x = (pos.x * width + width) / 2;
|
||||||
state.rect.y = (-pos.y * height + height) / 2 - size.h * height;
|
state.rect.y = (-pos.y * height + height) / 2 - size.h * height;
|
||||||
state.rect.w = size.w * width + 2;
|
state.rect.w = size.w * width + 3;
|
||||||
state.rect.h = size.h * height + 2;
|
state.rect.h = size.h * height + 3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LG_ROTATE_90:
|
case LG_ROTATE_90:
|
||||||
state.rect.x = (-pos.y * width + width) / 2 - size.h * width;
|
state.rect.x = (-pos.y * width + width) / 2 - size.h * width;
|
||||||
state.rect.y = (-pos.x * height + height) / 2 - size.w * height;
|
state.rect.y = (-pos.x * height + height) / 2 - size.w * height;
|
||||||
state.rect.w = size.h * width + 2;
|
state.rect.w = size.h * width + 3;
|
||||||
state.rect.h = size.w * height + 2;
|
state.rect.h = size.w * height + 3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LG_ROTATE_180:
|
case LG_ROTATE_180:
|
||||||
state.rect.x = (-pos.x * width + width) / 2 - size.w * width;
|
state.rect.x = (-pos.x * width + width) / 2 - size.w * width;
|
||||||
state.rect.y = (pos.y * height + height) / 2;
|
state.rect.y = (pos.y * height + height) / 2;
|
||||||
state.rect.w = size.w * width + 2;
|
state.rect.w = size.w * width + 3;
|
||||||
state.rect.h = size.h * height + 2;
|
state.rect.h = size.h * height + 3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LG_ROTATE_270:
|
case LG_ROTATE_270:
|
||||||
state.rect.x = (pos.y * width + width) / 2;
|
state.rect.x = (pos.y * width + width) / 2;
|
||||||
state.rect.y = (pos.x * height + height) / 2;
|
state.rect.y = (pos.x * height + height) / 2;
|
||||||
state.rect.w = size.h * width + 2;
|
state.rect.w = size.h * width + 3;
|
||||||
state.rect.h = size.w * height + 2;
|
state.rect.h = size.w * height + 3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DEBUG_UNREACHABLE();
|
DEBUG_UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
state.rect.x = max(0, state.rect.x);
|
state.rect.x = max(0, state.rect.x - 1);
|
||||||
state.rect.y = max(0, state.rect.y);
|
state.rect.y = max(0, state.rect.y - 1);
|
||||||
|
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
switch(cursor->type)
|
switch(cursor->type)
|
||||||
|
Loading…
Reference in New Issue
Block a user