In some cases windows apps may try to draw large cursors that exceed hardware accelerated cursor rendering on x servers. Ex: with nvidia proprietary the values may be: ``` $ xdpyinfo | grep -i cursor largest cursor: 256x256 ``` In such cases (even with 96dpi) on some x servers like xorg/xlibre cursor rendering may be unstable (rendering artifacts, flickering). Patch introduces optional logic path (manual toggle) that will attempt to conform win/x cursor to that of best reported by x. Note: Original hotpath is untouched. * create_xcursor_cursor - decouple windows cursor buffer from x cursor buffer, buffer dimensions logic * create_xcursor_frame - support target buffer dims != soruce buffer dims * two config fields toggling best cursor modes (if best cursor is smaller than requested cursor): - clamp_x_cursor_to_best_size: win cursor buffer will be clamped to max dimension values of the best cursor - fit_w_cursor_to_best_size: win cursor buffer dimensions will be reassigned to smaller value that fit best cursor dimensions --- Open to any suggestions/changes. Thanks! -- v4: Optional handling of XQueryBestCursor https://gitlab.winehq.org/wine/wine/-/merge_requests/10737