MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Cursor shown in v2.16.0

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    18 Posts 4 Posters 5.4k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      MajorC Project Sponsor
      last edited by

      Hi,

      I have a solid black cursor on my MM v2.16.0. The cursor disappears as soon as I move the mouse the first time.

      In the main.css I see:

      html {
        cursor: none;
        overflow: hidden;
        background: var(--color-background);
        user-select: none;
        font-size: var(--font-size);
      }
      

      I used the script from @sdetweil to update and install my MM.

      Any ideas how to fix that? I think, I saw this behavior first time after updating to v2.15.0.

      S 1 Reply Last reply Reply Quote 0
      • M Offline
        MacG
        last edited by

        I have that too but am still in the setup phase from the Magic Mirror. The mouse and keyboard are still connected. Have you seen these solutions?

        https://forum.magicmirror.builders/topic/9859/mouse-arrow-doesn-t-hide-after-magicmirror-is-loaded
        https://github.com/evghenix/MMM-Cursor

        A transparent PNG or GIF file will probably not work either, because a mouse movement is expected.

        cursor: url(pointer.png), none;
        

        the “none” is a necessary fallback.

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @MajorC
          last edited by

          @majorc maybe install unclutter?

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          M 1 Reply Last reply Reply Quote 0
          • M Offline
            MajorC Project Sponsor @sdetweil
            last edited by

            @sdetweil as it was working fine before, I am not 100% happy to just install something over.

            M 1 Reply Last reply Reply Quote 0
            • M Offline
              MajorC Project Sponsor @MajorC
              last edited by

              Fun fact, if I move the the mouse, the cursor disappears immediately.

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @MajorC
                last edited by

                @majorc so, it sounds like a defect in the electron version in 2.16

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                M 1 Reply Last reply Reply Quote 0
                • M Offline
                  MajorC Project Sponsor @sdetweil
                  last edited by

                  @sdetweil I do not know what that mean. Is there a way that I can fix it?

                  Or do I have to wait for version 17?

                  S karsten13K 2 Replies Last reply Reply Quote 0
                  • S Offline
                    sdetweil @MajorC
                    last edited by

                    @majorc if u use chrome do u see the cursor

                    my prior comment was that maybe WE don’t have a solution

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    M 1 Reply Last reply Reply Quote 0
                    • M Offline
                      MajorC Project Sponsor @sdetweil
                      last edited by

                      @sdetweil I see the cursor only on the pi. And it disappears if I move the mouse the first time on the pi. But the cursor is visible again after i do a

                      pm2 restart 0
                      

                      On my windows machine witch chrome, I don’t see the cursor at no time.

                      S 1 Reply Last reply Reply Quote 0
                      • S Offline
                        sdetweil @MajorC
                        last edited by

                        @majorc so, that confirms it’s an electron issue.

                        you could change to run server mode with chrome on the pi.

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        1 Reply Last reply Reply Quote 0
                        • karsten13K Offline
                          karsten13 @MajorC
                          last edited by

                          @majorc said in Cursor shown in v2.16.0:

                          Or do I have to wait for version 17?

                          In v2.16.0 we have electron v11, in current develop branch (which will become v2.17.0 in October) we have upgraded to electron v13.

                          S 1 Reply Last reply Reply Quote 1
                          • S Offline
                            sdetweil @karsten13
                            last edited by

                            @karsten13 @MajorC

                            so u can try develop, but there is no guarantee that is is fixed there

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            karsten13K 1 Reply Last reply Reply Quote 1
                            • karsten13K Offline
                              karsten13 @sdetweil
                              last edited by

                              could fix the black cursor with an entry in custom.css:

                              html {
                                cursor: none !important;
                              }
                              

                              Can you test if this works on your side? If so we should change this in main.css (will provide a PR then).

                              M 1 Reply Last reply Reply Quote 0
                              • M Offline
                                MajorC Project Sponsor @karsten13
                                last edited by

                                @karsten13 said in Cursor shown in v2.16.0:

                                Hi Kasten,

                                I tried !important in the custom.css and in the main.css. The cursor is still visible.
                                Even after after a reboot of the pi, the same, still visible.

                                I think I will wait for v2.17.0 in October.

                                karsten13K 2 Replies Last reply Reply Quote 0
                                • karsten13K Offline
                                  karsten13 @MajorC
                                  last edited by

                                  @majorc

                                  The cursor is still visible.

                                  :(

                                  tried yesterday on my pi3:

                                  • v2.16.0: no cursor
                                  • v2.17.0-develop: black cursor
                                  • v2.17.0-develop with css cursor: none !important;: no cursor

                                  So waiting on v2.17.0 is no solution.

                                  Another idea is to simulate a cursor movement on electron start.

                                  1 Reply Last reply Reply Quote 0
                                  • karsten13K Offline
                                    karsten13 @MajorC
                                    last edited by karsten13

                                    @majorc

                                    can you try to patch the file js/electron.js for a test, please add the following at line 74:

                                    	mainWindow.webContents.on('dom-ready', (event)=> {
                                    		mainWindow.webContents.sendInputEvent({type: "mouseMove", x: 0, y: 0});
                                    	});
                                    

                                    Does this hide the black cursor?

                                    (I changed the code here again …)

                                    M 1 Reply Last reply Reply Quote 0
                                    • M Offline
                                      MajorC Project Sponsor @karsten13
                                      last edited by

                                      @karsten13 said in Cursor shown in v2.16.0:

                                      Like so?

                                      // Open the DevTools if run with "npm start dev"
                                      	if (process.argv.includes("dev")) {
                                      		if (process.env.JEST_WORKER_ID !== undefined) {
                                      			// if we are running with jest
                                      			var devtools = new BrowserWindow(electronOptions);
                                      			mainWindow.webContents.setDevToolsWebContents(devtools.webContents);
                                      		}
                                      		mainWindow.webContents.openDevTools();
                                      	}
                                      
                                      	// Set responders for window events.
                                      	mainWindow.webContents.on('dom-ready', (event)=> {
                                      		mainWindow.webContents.sendInputEvent({type: "mouseMove", x: 0, y: 0});
                                      	});
                                      	
                                      	mainWindow.on("closed", function () {
                                      		mainWindow = null;
                                      	});
                                      

                                      That works perfekt! Thank you so much!

                                      karsten13K 1 Reply Last reply Reply Quote 0
                                      • karsten13K Offline
                                        karsten13 @MajorC
                                        last edited by

                                        @majorc o.k., then I will provide a PR for this in the mm repo

                                        1 Reply Last reply Reply Quote 0

                                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                        With your input, this post could be even better 💗

                                        Register Login
                                        • 1 / 1
                                        • First post
                                          Last post
                                        Enjoying MagicMirror? Please consider a donation!
                                        MagicMirror created by Michael Teeuw.
                                        Forum managed by Sam, technical setup by Karsten.
                                        This forum is using NodeBB as its core | Contributors
                                        Contact | Privacy Policy