Browse Source
Merge pull request #6745 from jp2masa/x11-default-cursor
Changed X11 default cursor to XC_left_ptr
pull/6755/head
Dan Walmsley
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
3 additions and
3 deletions
-
src/Avalonia.X11/X11CursorFactory.cs
-
src/Avalonia.X11/X11Info.cs
|
|
|
@ -23,7 +23,7 @@ namespace Avalonia.X11 |
|
|
|
private static readonly Dictionary<StandardCursorType, CursorFontShape> s_mapping = |
|
|
|
new Dictionary<StandardCursorType, CursorFontShape> |
|
|
|
{ |
|
|
|
{StandardCursorType.Arrow, CursorFontShape.XC_top_left_arrow}, |
|
|
|
{StandardCursorType.Arrow, CursorFontShape.XC_left_ptr}, |
|
|
|
{StandardCursorType.Cross, CursorFontShape.XC_cross}, |
|
|
|
{StandardCursorType.Hand, CursorFontShape.XC_hand2}, |
|
|
|
{StandardCursorType.Help, CursorFontShape.XC_question_arrow}, |
|
|
|
@ -67,7 +67,7 @@ namespace Avalonia.X11 |
|
|
|
{ |
|
|
|
handle = s_mapping.TryGetValue(cursorType, out var shape) |
|
|
|
? _cursors[shape] |
|
|
|
: _cursors[CursorFontShape.XC_top_left_arrow]; |
|
|
|
: _cursors[CursorFontShape.XC_left_ptr]; |
|
|
|
} |
|
|
|
return new CursorImpl(handle); |
|
|
|
} |
|
|
|
|
|
|
|
@ -42,7 +42,7 @@ namespace Avalonia.X11 |
|
|
|
DefaultScreen = XDefaultScreen(display); |
|
|
|
BlackPixel = XBlackPixel(display, DefaultScreen); |
|
|
|
RootWindow = XRootWindow(display, DefaultScreen); |
|
|
|
DefaultCursor = XCreateFontCursor(display, CursorFontShape.XC_top_left_arrow); |
|
|
|
DefaultCursor = XCreateFontCursor(display, CursorFontShape.XC_left_ptr); |
|
|
|
DefaultRootWindow = XDefaultRootWindow(display); |
|
|
|
Atoms = new X11Atoms(display); |
|
|
|
|
|
|
|
|