Repository: renpy/renpy

Issue #3112: [Request] Ability to click buttons without pre-focusing game window
Created: 2021-10-30T17:12:37Z
If the Ren'py game window is not currently focused and you intend to click a button in it, you must first click on the window and only then after the window has gained focus will you be able to click to activate the button. So something that would otherwise take only one button click will require 2. Admittedly this is not an issue for normal usage since you don't expect users to tab in and out during play a lot, but for the users who do this can be a small appreciated QOL feature, and for other fringe cases it can be a bigger deal.
Case in point, I created a model viewer tool (as a standalone Ren'py project) to help me visually select expressions during the scripting process and it's been a super handy tool, but at the moment it takes me twice as many clicks to select expressions because I first have to click on the game window to focus it, and only then can I select the expression I want. Being able to do this in one click would reduce the amount of clicks I have to do in half. For a long project this results in a non negligible time gain.
I brought this issue up on the discord server and Somniarre said they remember being able to do this in 7.3.5, but no longer after 7.4.0. I rummaged through the changelog but didn't find any note related to it, so I imagine it got changed as a result of some other feature being addressed. Is it possible that this specific thing could be reversed, or to give developers the option to toggle it?
ps: For what it's worth, the standard in software is for you to be able to activate buttons without needling to pre-focus the window. Web browsers and game engines like Unity work this way.

Duplicate issue #3149: [Bug] RenPy project loader unresponsive to first click after window losing focus.
Created: 2021-11-30T20:38:16Z
Windows Version (64-bit), On Windows 10
The project loader, main program, will indicate that it is "in focus" as menu-items "glow" showing them in "hover" state. However, the first click on the window is being "discarded" or "interrupted" by something in the GUI. Making it unresponsive to the first click. However, this is ONLY to the GUI, as clicking "Close" or any "window buttons", does not have this ghost-click effect.
To reproduce: Open Renpy. Open Some other program with a window. Do anything within the other open window, so Renpy has "lost window focus". Now move your mouse over any label in the renpy screen and you can see it indicates "hover" state by highlighting the hovered text. Try to click that label and nothing happens. Click it again, and it acts as intended.
Expected operation: Do the above, but the first click should be acted upon, not disappearing or being discarded or consumed by some ghost-issue.
Relatable internal issue: Displaying a screen with a "show screen MyScreen" from "label start:" and then hiding with an "action Show('MyOtherScreen')", having a similar tagged-ID screen, has a similar issue when the second screen is closed with an "action Hide()". The second screen closes, but there is a "ghost-click", before dialogue will continue. It is as if the first screen is still there, just not seen, consuming the click. (Only resolved by "calling" the screen instead of using "show screen MyScreen")

Closing comment (2021-11-30T21:16:18Z): Duplicate of #3112.
You can use config.mouse_focus_clickthrough = True currently avaliable in 7.4.11 prerelease.