linux-capture: Rename pos_* vars to render_*
the pos_x and pos_y variables were somewhat deceptive, because they were not actually the poition of the cursor. They represented the position of the cursor's bitmap on the screen, not the position of the cursor.
This commit is contained in:
parent
15fb027647
commit
378e910ad3
@ -85,8 +85,8 @@ void xcursor_tick(xcursor_t *data) {
|
||||
|
||||
if (!data->tex || data->last_serial != xc->cursor_serial)
|
||||
xcursor_create(data, xc);
|
||||
data->pos_x = xc->x - xc->xhot - data->x_org;
|
||||
data->pos_y = xc->y - xc->yhot - data->y_org;
|
||||
data->render_x = xc->x - xc->xhot - data->x_org;
|
||||
data->render_y = xc->y - xc->yhot - data->y_org;
|
||||
|
||||
XFree(xc);
|
||||
}
|
||||
@ -97,7 +97,7 @@ void xcursor_render(xcursor_t *data) {
|
||||
gs_effect_set_texture(image, data->tex);
|
||||
|
||||
gs_matrix_push();
|
||||
gs_matrix_translate3f(data->pos_x, data->pos_y, 0.0f);
|
||||
gs_matrix_translate3f(data->render_x, data->render_y, 0.0f);
|
||||
|
||||
gs_enable_blending(True);
|
||||
gs_blend_function(GS_BLEND_ONE, GS_BLEND_INVSRCALPHA);
|
||||
|
@ -25,8 +25,8 @@ extern "C" {
|
||||
|
||||
typedef struct {
|
||||
Display *dpy;
|
||||
float pos_x;
|
||||
float pos_y;
|
||||
float render_x;
|
||||
float render_y;
|
||||
unsigned long last_serial;
|
||||
uint_fast32_t last_width;
|
||||
uint_fast32_t last_height;
|
||||
|
Loading…
x
Reference in New Issue
Block a user