Skip to content

Commit

Permalink
Fix HiDPI cursors on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
dapetcu21 committed Mar 28, 2019
1 parent 6586cbc commit 89963ba
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion defos/src/defos_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,14 @@ void defos_update()
void * defos_load_cursor_linux(const char *filename)
{
CustomCursor * cursor = new CustomCursor();
cursor->cursor = XcursorFilenameLoadCursor(disp, filename);
int cursorSize = XcursorGetDefaultSize(disp);
XcursorImage * image = XcursorFilenameLoadImage(filename, cursorSize);
if (image) {
cursor->cursor = XcursorImageLoadCursor(disp, image);
XcursorImageDestroy(image);
} else {
cursor->cursor = invisible_cursor;
}
cursor->ref_count = 1;
return cursor;
}
Expand Down

0 comments on commit 89963ba

Please sign in to comment.