Merge branch 'master' of ssh://forgejo.nishi.boats:2221/pyrite-dev/milsko
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
This commit is contained in:
commit
6277c8837a
9 changed files with 236 additions and 234 deletions
|
|
@ -589,8 +589,8 @@ HCURSOR MwLLGDICreateCursor(MwCursor* image, MwCursor* mask) {
|
|||
int y, x, ys, xs;
|
||||
|
||||
xs = -mask->x + image->x;
|
||||
ys = MwCursorDataHeight + mask->y;
|
||||
ys = MwCursorDataHeight + image->y - ys;
|
||||
ys = mask->height + mask->y;
|
||||
ys = image->height + image->y - ys;
|
||||
|
||||
memset(dmask, 0xff, (MwCursorDataHeight / 8) * MwCursorDataHeight);
|
||||
memset(dimage, 0, (MwCursorDataHeight / 8) * MwCursorDataHeight);
|
||||
|
|
@ -621,7 +621,7 @@ HCURSOR MwLLGDICreateCursor(MwCursor* image, MwCursor* mask) {
|
|||
}
|
||||
}
|
||||
|
||||
cursor = CreateCursor(GetModuleHandle(NULL), xs, ys, MwCursorDataHeight, MwCursorDataHeight, dmask, dimage);
|
||||
cursor = CreateCursor(GetModuleHandle(NULL), xs - image->x, ys + (MwCursorDataHeight + image->y), MwCursorDataHeight, MwCursorDataHeight, dmask, dimage);
|
||||
|
||||
free(dimage);
|
||||
free(dmask);
|
||||
|
|
|
|||
|
|
@ -811,8 +811,8 @@ Cursor MwLLX11CreateCursor(Display* display, MwCursor* image, MwCursor* mask) {
|
|||
XColor cfg, cbg;
|
||||
|
||||
xs = -mask->x + image->x;
|
||||
ys = MwCursorDataHeight + mask->y;
|
||||
ys = MwCursorDataHeight + image->y - ys;
|
||||
ys = mask->height + mask->y;
|
||||
ys = image->height + image->y - ys;
|
||||
|
||||
memset(cimage->data, 0, cimage->bytes_per_line * cimage->height);
|
||||
memset(cmask->data, 0, cmask->bytes_per_line * cmask->height);
|
||||
|
|
@ -849,7 +849,7 @@ Cursor MwLLX11CreateCursor(Display* display, MwCursor* image, MwCursor* mask) {
|
|||
XPutImage(display, pimage, imagegc, cimage, 0, 0, 0, 0, MwCursorDataHeight, MwCursorDataHeight);
|
||||
XPutImage(display, pmask, maskgc, cmask, 0, 0, 0, 0, MwCursorDataHeight, MwCursorDataHeight);
|
||||
|
||||
cur = XCreatePixmapCursor(display, pimage, pmask, &cfg, &cbg, xs, ys);
|
||||
cur = XCreatePixmapCursor(display, pimage, pmask, &cfg, &cbg, xs - image->x, ys + (MwCursorDataHeight + image->y));
|
||||
|
||||
XFreePixmap(display, pimage);
|
||||
XFreePixmap(display, pmask);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue