File tree Expand file tree Collapse file tree
py5_jar/src/main/java/py5/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -190,12 +190,12 @@ public void setup() {
190190 if (success ) {
191191 PSurface surface = getSurface ();
192192
193- // request focus for Java2D renderer on Windows and MacOS
194- if (platform == WINDOWS && sketchRenderer ().equals (JAVA2D )) {
193+ // request focus for Java2D and FX2D renderers on Windows and MacOS
194+ if (platform == WINDOWS && ( sketchRenderer ().equals (JAVA2D ) || sketchRenderer (). equals ( FX2D ) )) {
195195 Canvas canvas = (Canvas ) surface .getNative ();
196196 canvas .setFocusable (true );
197197 canvas .requestFocus ();
198- } else if (platform == MACOS && (sketchRenderer ().equals (JAVA2D ) || g .isGL ())) {
198+ } else if (platform == MACOS && (sketchRenderer ().equals (JAVA2D ) || sketchRenderer (). equals ( FX2D ) || g .isGL ())) {
199199 ThinkDifferent .activateSketchWindow ();
200200 }
201201
@@ -261,7 +261,8 @@ public void draw() {
261261 }
262262
263263 if (frameCount == 1 && platform == LINUX && g .isGL ()) {
264- // Linux with KDE Plasma window manager and OpenGL need to capture pixels after the last draw() call
264+ // Linux with KDE Plasma window manager and OpenGL need to capture pixels after
265+ // the last draw() call
265266 capturePixels ();
266267 }
267268 }
You can’t perform that action at this time.
0 commit comments