Fix incorrect cursor location
This commit is contained in:
parent
1d2e042240
commit
fce23c482c
3 changed files with 2 additions and 7 deletions
|
|
@ -224,7 +224,6 @@ std::optional<nv12_t> import_target(
|
||||||
class cursor_t : public platf::img_t {
|
class cursor_t : public platf::img_t {
|
||||||
public:
|
public:
|
||||||
int x, y;
|
int x, y;
|
||||||
int xhot, yhot;
|
|
||||||
|
|
||||||
unsigned long serial;
|
unsigned long serial;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -555,8 +555,6 @@ public:
|
||||||
cursor_opt->capture(*img);
|
cursor_opt->capture(*img);
|
||||||
|
|
||||||
img->x -= offset_x;
|
img->x -= offset_x;
|
||||||
img->xhot -= offset_x;
|
|
||||||
img->yhot -= offset_y;
|
|
||||||
img->y -= offset_y;
|
img->y -= offset_y;
|
||||||
|
|
||||||
return capture_e::ok;
|
return capture_e::ok;
|
||||||
|
|
|
||||||
|
|
@ -794,10 +794,8 @@ void cursor_t::capture(egl::cursor_t &img) {
|
||||||
img.data = img.buffer.data();
|
img.data = img.buffer.data();
|
||||||
img.width = xcursor->width;
|
img.width = xcursor->width;
|
||||||
img.height = xcursor->height;
|
img.height = xcursor->height;
|
||||||
img.xhot = xcursor->xhot;
|
img.x = xcursor->x - xcursor->xhot;
|
||||||
img.yhot = xcursor->yhot;
|
img.y = xcursor->y - xcursor->yhot;
|
||||||
img.x = xcursor->x;
|
|
||||||
img.y = xcursor->y;
|
|
||||||
img.pixel_pitch = 4;
|
img.pixel_pitch = 4;
|
||||||
img.row_pitch = img.pixel_pitch * img.width;
|
img.row_pitch = img.pixel_pitch * img.width;
|
||||||
img.serial = xcursor->cursor_serial;
|
img.serial = xcursor->cursor_serial;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue