Hi folks,
A pesky little annoyance I'd like to fix.
When I switch out from fullscreen to a window, I find that I have to click once to 'wake' the window before love.mousepressed registers anything (which it does with the second click). I've checked love.mousefocus and it doesn't seem to be negative as well as love.window.hasFocus and I've tried love.window.requestAttention.
I'm running OS X if that's relevant.
It's not a massive thing -- but is there a way to get around it?
Switching to windowed mode, have to click twice?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Party member
- Posts: 126
- Joined: Sat May 09, 2015 9:15 pm
Re: Switching to windowed mode, have to click twice?
I don't have that problem on my (Linux) system. But there's WAY too many variables to help diagnose the issue without seeing some code. Can you post your .love or a mini .lua that reproduces the issue?
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
-
- Party member
- Posts: 126
- Joined: Sat May 09, 2015 9:15 pm
Re: Switching to windowed mode, have to click twice?
It's not much to look at yet but I've attached the .love file.
To reproduce:
-Click "Open Editor"
-Try clicking "New" (nothing happens)
-Click again without moving the mouse... it works!
To reproduce:
-Click "Open Editor"
-Try clicking "New" (nothing happens)
-Click again without moving the mouse... it works!
- Attachments
-
- RPG Sandbox.love
- (161.38 KiB) Downloaded 97 times
Re: Switching to windowed mode, have to click twice?
Works for me on Linux. First click brings up a popup.randomnovice wrote: ↑Mon Feb 07, 2022 9:49 pm It's not much to look at yet but I've attached the .love file.
To reproduce:
-Click "Open Editor"
-Try clicking "New" (nothing happens)
-Click again without moving the mouse... it works!
My boat driving game demo: https://dusoft.itch.io/captain-bradley- ... itius-demo
- BrotSagtMist
- Party member
- Posts: 657
- Joined: Fri Aug 06, 2021 10:30 pm
Re: Switching to windowed mode, have to click twice?
Usually this is a matter of the window manager and your settings, nothing that löve can control, if its not sending a click there is nothing to react on.
However, ive added a print in your love.run section:The focus flickers and the order of events seems to be odd.
In anycase i think you can just go around this by simply not using fullscreen but a frameless full screen sized window instead.
However, ive added a print in your love.run section:
Code: Select all
visibletrue nil nil nil nil nil
mousefocus true nil nil nil nil nil
focus true nil nil nil nil nil
mousepressed 922 326 1 false 1 nil
visibletrue nil nil nil nil nil
mousefocus true nil nil nil nil nil
focus true nil nil nil nil nil
focus false nil nil nil nil nil
focus true nil nil nil nil nil
resize 1920 1053 nil nil nil nil
mousereleased 922 326 1 false 1 nil
mousepressed 114 12 1 false 1 nil
mousereleased 114 12 1 false 1 nil
In anycase i think you can just go around this by simply not using fullscreen but a frameless full screen sized window instead.
obey
-
- Party member
- Posts: 126
- Joined: Sat May 09, 2015 9:15 pm
Re: Switching to windowed mode, have to click twice?
Thanks for confirming. That's what I guessed but I wasn't sure.Usually this is a matter of the window manager and your settings, nothing that löve can control
True. It was a preference thing, not a major deal.you can just go around this by simply not using fullscreen but a frameless full screen sized window instead.
Who is online
Users browsing this forum: No registered users and 1 guest