Skip to content

Commit

Permalink
Fix cursors double-size on Mac and Linux 11
Browse files Browse the repository at this point in the history
See eclipse-gef#354

On Mac and Linux X11 device zoom should always be 100% when creating the ImageData for the cursor.
  • Loading branch information
Phillipus committed Jan 13, 2024
1 parent 586bead commit 3c47a62
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion org.eclipse.gef/src/org/eclipse/gef/SharedCursors.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ private static int getDeviceZoom() {
}
}
}
return deviceZoom;
// On Mac and Linux X11 ImageData for cursors should always be created with 100% device zoom
return Platform.getOS().equals(Platform.OS_MACOSX) ||
(Platform.getOS().equals(Platform.OS_LINUX) && "x11".equalsIgnoreCase(System.getenv("XDG_SESSION_TYPE"))) //$NON-NLS-1$ //$NON-NLS-2$
? 100
: deviceZoom;
}

}

0 comments on commit 3c47a62

Please sign in to comment.