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

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
molul
Party member
Posts: 264
Joined: Sun Feb 05, 2012 6:51 pm
Location: Valencia, Spain
Contact:

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

Post 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?
User avatar
zorg
Party member
Posts: 3468
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

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

Post 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
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
molul
Party member
Posts: 264
Joined: Sun Feb 05, 2012 6:51 pm
Location: Valencia, Spain
Contact:

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

Post 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 :)
Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests