Page 1 of 1

Mouse pointer visible in Linux when love.modules.mouse = false

Posted: Fri Mar 08, 2019 8:35 pm
by molul
I have "love.mouse.setVisible(love.system.getOS() ~= "Linux")" at the very beginning of my program, but this shows the mouse pointer for a moment before hiding.

I'd prefer to have it hidden when I launch my application. I tried disabling love.modules.mouse in conf.lua, but that makes the pointer visible all the time.

Is there any way to do what I want apart from modifying and building LÖVE?

Re: Mouse pointer visible in Linux when love.modules.mouse = false

Posted: Fri Mar 08, 2019 8:46 pm
by zorg
love.modules.mouse = false only disables the mouse module, or in other words, you won't be able to call any functions it gives you; assuming your OS has a visible cursor before the even you start a löve project, i'd say it's the default state, and that's what you'll continue to get without the module in question.

When you do enable it, and call setVisible with false as a parameter (or whatever your reason is to only hide the mouse on anything but linux) it will show it for a bit since it takes time for the program to get to that line, so that it would hide it; i don't think it's anything you can modify in löve anyway, so rebuilding may be pointless.

THAT SAID,

You can still try two things, either call setVisible at the top of love.run that you can copy off of the wiki if you don't have a custom one,

Or you can choose not to have löve create a window by default in conf.lua, and disable the cursor -before- you create the window; same effect, it will be hidden when the window gets created.

To be honest, it still interests me what this would be used for, the only thing i can think of is some lame idea about faux-preventing people from using(or at the very least, making it hard for them to use) a löve project on specific OS-es. :P

Re: Mouse pointer visible in Linux when love.modules.mouse = false

Posted: Sat Mar 09, 2019 8:59 am
by molul
Hahahah. Sorry, maybe I shouldn't have included the "love.system.getOS() ~= "Linux"" thing. It's not important. I develop on Windows but the project is for Raspberry Pi. On the Pi I don't want to see the mouse, but on Windows, it bugs me a little not seeing the mouse pointer when it passes over the window. A silly habit XD

Tried those two things (thanks, btw!) but got the same result. Well, nevermind. If it's not easy to avoid, I guess I can live with that :)