Hi Michael, Thanks for the awesome suggestion. I am compiling my own jdk and javafx, so i can patch it for my needs as you suggest.
On further investigations I also see that the AndroidPlatform and the HeadlessPlatform just return a NullCursor on their createCursor methods which is a no-op implementation of cursor interface, so this also looks like an option. Further option would be at the application implementation level so that cursor disabling feature can be used across all platforms I have put up an issue request and will submit a pull request if my investigations are successful. https://github.com/javafxports/openjdk-jfx/issues/489 many thanks ------------------------------ Message: 2 Date: Mon, 3 Jun 2019 07:25:42 +0000 From: Doswald Michael <michael.dosw...@schiller.ch><mailto:michael.dosw...@schiller.ch> To: "openjfx-dev@openjdk.java.net"<mailto:openjfx-dev@openjdk.java.net> <openjfx-dev@openjdk.java.net><mailto:openjfx-dev@openjdk.java.net> Subject: RE: Can Javafx cursor be disabled? Message-ID: <a071e13eef344130a54be6ef685a9...@schiller.ch><mailto:a071e13eef344130a54be6ef685a9...@schiller.ch> Content-Type: text/plain; charset="iso-8859-1" Hi, I had the same problem using i.MX6 with a touchscreen and Monocle on framebuffer (with JavaFX 1.8u151-b12). Unfortunately I could not find a workaround because, as you said, the gray cursor placeholder is displayed before any application code is executed. So there is no way to disable it using Java code. Since I compile the JavaFX part myself, I added the following patch to hide the cursor on startup. This seems to work for me: -------------------------------------------------------------------------------- diff -r fa07d9fbd309 modules/graphics/src/main/java/com/sun/glass/ui/monocle/MX6Cursor.java --- a/modules/graphics/src/main/java/com/sun/glass/ui/monocle/MX6Cursor.java Tue Sep 13 12:52:05 2016 -0400 +++ b/modules/graphics/src/main/java/com/sun/glass/ui/monocle/MX6Cursor.java Mon Sep 19 18:25:20 2016 +0200 @@ -154,6 +154,8 @@ NativeScreen screen = NativePlatformFactory.getNativePlatform().getScreen(); screenWidth = screen.getWidth(); screenHeight = screen.getHeight(); + + setVisibility(false); } @Override -------------------------------------------------------------------------------- Regards, Michael Hi, thanks for. Yes we are currently running without X and using Monocle. Maybe I'll put up a feature request as with embedded devices often the cursor is not a relevant modality. ------------------------------ Message: 3 Date: Sat, 1 Jun 2019 22:23:41 +0000 From: Thiago Milczarek Sayao <thiago.sayao at clamed.com.br> To: "openjfx-dev at openjdk.java.net" <openjfx-dev at openjdk.java.net> Subject: RE: Can Javafx cursor be disabled? Message-ID: <CP2P15201MB2228D69EB9511A2327182751DE1A0 at CP2P15201MB2228.LAMP152.PROD.OUTLOOK.COM> Content-Type: text/plain; charset="iso-8859-1" Just realized you might be using Monocle. So it might be handling the cursor. Don't know how to hide it.. ________________________________ De: openjfx-dev <openjfx-dev-bounces at openjdk.java.net> em nome de Thiago Milczarek Sayao <thiago.sayao at clamed.com.br> Enviado: s?bado, 1 de junho de 2019 19:18 Para: openjfx-dev at openjdk.java.net Assunto: RE: Can Javafx cursor be disabled? I don't think javafx supports framebuffer. It might be working on gtk2, but will not work on gtk3 since the framebuffer backend was removed from gdk. So I suggest you move to X11. ________________________________ De: openjfx-dev <openjfx-dev-bounces at openjdk.java.net> em nome de Dell Green <Dell.Green at ideaworks.co.uk> Enviado: s?bado, 1 de junho de 2019 16:28 Para: openjfx-dev at openjdk.java.net Assunto: RE: Can Javafx cursor be disabled? Thanks for that, good to know. I should of mentioned that we are not using X, but using framebuffer instead Message: 2 Date: Fri, 31 May 2019 14:45:11 +0000 From: Thiago Milczarek Sayao <thiago.sayao at clamed.com.br> To: "openjfx-dev at openjdk.java.net" <openjfx-dev at openjdk.java.net> Subject: RE: Can Javafx cursor be disabled? Message-ID: <CP2P15201MB2228E9E20DE675B52AE4B7A1DE190 at CP2P15201MB2228.LAMP152.PROD.OUTLOOK.COM> Content-Type: text/plain; charset="us-ascii" If you are using X.org, the cursor is controlled by X, so I would look for a X configuration to disable cursor. https://unix.stackexchange.com/questions/346903/can-i-remove-the-mouse-pointer-entirely-from-x ________________________________ De: openjfx-dev <openjfx-dev-bounces at openjdk.java.net> em nome de Dell Green <Dell.Green at ideaworks.co.uk> Enviado: sexta-feira, 31 de maio de 2019 11:29 Para: openjfx-dev at openjdk.java.net Assunto: Can Javafx cursor be disabled? We have a touch/rotary device that doesn't use any mouse/cursor input. Is there a way to tell javafx to not initialize a cursor (MX6Cursor.java in my case) on startup as we are seeing /dev/fb1 being unblanked and a grey cursor artifact drawn onto the /dev/fb1, before any user specific javafx code is created. I have looked through the source code and there doesn't seem to be a configurable property to control this. I can remove /dev/fb1 and javafx prints an error/stack-trace but appears to work as normal, however I'm not sure what ongoing impact this has on javafx. any thoughts? End of openjfx-dev Digest, Vol 91, Issue 1 ****************************************** End of openjfx-dev Digest, Vol 91, Issue 2 ****************************************** End of openjfx-dev Digest, Vol 91, Issue 3 ******************************************