Commit c83dcc08 authored by sadrul@chromium.org's avatar sadrul@chromium.org

aura: Use the default high-dpi cursor for unsupported cursors.

For cursors that don't have an aura-image asset, the corresponding
X11 cursor is displayed. However, in high-dpi, the default X11 cursors
are small. So always use the high-dpi default-cursor for these cases.

BUG=143268

Review URL: https://chromiumcodereview.appspot.com/10854211

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152341 0039d316-1c4b-4281-b951-d872f2087c98
parent fd65df74
......@@ -1051,12 +1051,17 @@ bool RootWindowHostLinux::IsWindowManagerPresent() {
}
void RootWindowHostLinux::SetCursorInternal(gfx::NativeCursor cursor) {
::Cursor xcursor =
image_cursors_->IsImageCursor(cursor) ?
image_cursors_->ImageCursorFromNative(cursor) :
(cursor == ui::kCursorNone ? invisible_cursor_ :
(cursor == ui::kCursorCustom ? cursor.platform() :
ui::GetXCursor(CursorShapeFromNative(cursor))));
::Cursor xcursor;
if (image_cursors_->IsImageCursor(cursor))
xcursor = image_cursors_->ImageCursorFromNative(cursor);
else if (cursor == ui::kCursorNone)
xcursor = invisible_cursor_;
else if (cursor == ui::kCursorCustom)
xcursor = cursor.platform();
else if (delegate_->GetDeviceScaleFactor() == 1.0)
xcursor = ui::GetXCursor(CursorShapeFromNative(cursor));
else
xcursor = image_cursors_->ImageCursorFromNative(ui::kCursorPointer);
XDefineCursor(xdisplay_, xwindow_, xcursor);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment