From b7d5f987add6dd5d29f7c0fb5bb78d82d5d1a8cf Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Sat, 8 Aug 2015 14:54:17 -0400 Subject: [PATCH] add workaround for setTitle() resetting cursor() (fixes #3472) --- core/src/processing/awt/PSurfaceAWT.java | 6 ++++++ core/src/processing/opengl/PSurfaceJOGL.java | 3 ++- core/todo.txt | 4 ++++ todo.txt | 2 ++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/core/src/processing/awt/PSurfaceAWT.java b/core/src/processing/awt/PSurfaceAWT.java index 3049516b4..f98b8eec6 100644 --- a/core/src/processing/awt/PSurfaceAWT.java +++ b/core/src/processing/awt/PSurfaceAWT.java @@ -552,6 +552,12 @@ public class PSurfaceAWT extends PSurfaceNone { @Override public void setTitle(String title) { frame.setTitle(title); + // Workaround for apparent Java bug? + // https://github.com/processing/processing/issues/3472 + if (cursorVisible) { + hideCursor(); + showCursor(); + } } diff --git a/core/src/processing/opengl/PSurfaceJOGL.java b/core/src/processing/opengl/PSurfaceJOGL.java index 9ea2b20c0..89135ddb6 100644 --- a/core/src/processing/opengl/PSurfaceJOGL.java +++ b/core/src/processing/opengl/PSurfaceJOGL.java @@ -975,11 +975,12 @@ public class PSurfaceJOGL implements PSurface { return def; } + // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . public void setCursor(int kind) { - System.err.println("Cursor types not supported in OpenGL, provide your cursor image"); + PGraphics.showWarning("Cursor types not yet supported in OpenGL, provide your cursor image"); } diff --git a/core/todo.txt b/core/todo.txt index c9bda1ba9..ab48a0973 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -4,6 +4,8 @@ X prevents "fullScreen() cannot be used here" message on startup X https://github.com/processing/processing/issues/3545 X throw an error when using methods that require sketchPath outside setup() X https://github.com/processing/processing/issues/3433 +X cursor(CROSS) breaks when using surface.setTitle() +X https://github.com/processing/processing/issues/3472 fixed earlier X blend() and copy() are not pixel accurate for copy/scale @@ -80,6 +82,8 @@ opengl _ hard crash at 1920x1080, mirrored, Casey's GT 650M 1GB _ window loses focus after maximizing _ https://github.com/processing/processing/issues/3339 +_ Implement standard cursor types in OpenGL +_ https://github.com/processing/processing/issues/3554 opengl questions diff --git a/todo.txt b/todo.txt index 4c41c5f5b..e22a623fd 100644 --- a/todo.txt +++ b/todo.txt @@ -47,6 +47,8 @@ _ probably have to add the script/Processing.app location to user's path gui _ fix red in sidebar, the squiggly line beneath code _ show hover text with 'debug' +_ show number of updates available in the footer +_ https://github.com/processing/processing/issues/3518 _ don't show breakpoints when debugger is off _ https://github.com/processing/processing/issues/3093 _ no setting breakpoints when debugger is off