From d4a4888b9d1a5fb436f0ab4d8d7fd80d644c12b8 Mon Sep 17 00:00:00 2001 From: Sergii Stoian Date: Wed, 17 Apr 2019 18:06:19 +0300 Subject: [PATCH] * Source/x11/XGServerWindow.m (getStandardBitmap): send `bitmapFormat` to _convertToFormatBitsPerSample::::::::. Fixes display of colored mouse cursor images. (standardcursor::): cleanup in Xlib cursors handling. Additional cursor types were added: GSClosedHandCursor, GSOpenHandCursor. Removed GSDisappearingItemCursor type handling - it loads in NSCursor from image. --- ChangeLog | 10 ++++++++++ Source/x11/XGServerWindow.m | 25 ++++++++++++++----------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3dd0e8d..f877e3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2019-04-17 Sergii Stoian + + * Source/x11/XGServerWindow.m (getStandardBitmap): send `bitmapFormat` + to _convertToFormatBitsPerSample::::::::. Fixes display of colored + mouse cursor images. + (standardcursor::): cleanup in Xlib cursors handling. Additional + cursor types were added: GSClosedHandCursor, GSOpenHandCursor. + Removed GSDisappearingItemCursor type handling - it loads in NSCursor + from image. + 2019-04-12 Sergii Stoian * Source/x11/XGServerEvent.m (mouseOptionsChanged:): change double-click diff --git a/Source/x11/XGServerWindow.m b/Source/x11/XGServerWindow.m index 62d8db8..07fa51f 100644 --- a/Source/x11/XGServerWindow.m +++ b/Source/x11/XGServerWindow.m @@ -142,7 +142,7 @@ static NSBitmapImageRep *getStandardBitmap(NSImage *image) hasAlpha: [rep hasAlpha] isPlanar: NO colorSpaceName: NSCalibratedRGBColorSpace - bitmapFormat: 0 + bitmapFormat: [rep bitmapFormat] bytesPerRow: 0 bitsPerPixel: 0]; } @@ -4177,29 +4177,32 @@ xgps_cursor_image(Display *xdpy, Drawable draw, const unsigned char *data, case GSIBeamCursor: cursor = XCreateFontCursor(dpy, XC_xterm); break; + case GSClosedHandCursor: + cursor = XCreateFontCursor(dpy, XC_fleur); + break; + case GSOpenHandCursor: + cursor = XCreateFontCursor(dpy, XC_hand1); + break; + case GSPointingHandCursor: + cursor = XCreateFontCursor(dpy, XC_hand2); + break; case GSCrosshairCursor: cursor = XCreateFontCursor(dpy, XC_crosshair); break; - case GSDisappearingItemCursor: - cursor = XCreateFontCursor(dpy, XC_shuttle); - break; - case GSPointingHandCursor: - cursor = XCreateFontCursor(dpy, XC_hand1); - break; case GSResizeDownCursor: - cursor = XCreateFontCursor(dpy, XC_bottom_side); + cursor = XCreateFontCursor(dpy, XC_sb_down_arrow); break; case GSResizeLeftCursor: - cursor = XCreateFontCursor(dpy, XC_left_side); + cursor = XCreateFontCursor(dpy, XC_sb_left_arrow); break; case GSResizeLeftRightCursor: cursor = XCreateFontCursor(dpy, XC_sb_h_double_arrow); break; case GSResizeRightCursor: - cursor = XCreateFontCursor(dpy, XC_right_side); + cursor = XCreateFontCursor(dpy, XC_sb_right_arrow); break; case GSResizeUpCursor: - cursor = XCreateFontCursor(dpy, XC_top_side); + cursor = XCreateFontCursor(dpy, XC_sb_up_arrow); break; case GSResizeUpDownCursor: cursor = XCreateFontCursor(dpy, XC_sb_v_double_arrow);