godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.96k stars 20.18k forks source link

Run Project doesn't automatically focus the game window #95118

Open MM4096 opened 1 month ago

MM4096 commented 1 month ago

Tested versions

System information

Godot v4.3.rc2.mono - Ubuntu 24.04 LTS 24.04 - Wayland - Vulkan (Forward+) - integrated Intel(R) HD Graphics 4400 (HSW GT2) - Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz (4 Threads)

Issue description

With v4.3 (rc2), running a project with F5 or with the Run Project button, focus is not on the newly-created window, but on the Godot editor instead. NOTE: Cannot reproduce consistently.

Steps to reproduce

CANNOT REPRODUCE CONSISTENTLY. The display mode has to be set to Exclusive Fullscreen or Fullscreen according to my current tests Here's how I have gotten the bug to occasionally happen:

  1. By upgrading a 4.2 project to 4.3, then immediately following the following steps:
    • Open a script file (to easily test focus).
    • Run project (in any way).
    • Press Enter a few times
    • Go back to the editor view, and see if you typed any line breaks.
      1. Open a 4.3 project, then fullscreen it (Shift + F11).
    • Follow the above steps

Minimal reproduction project (MRP)

N/A

akien-mga commented 1 month ago

I tested with 4.3.rc2 on Fedora 40 KDE Wayland, with both the X11 and Wayland DisplayServers, and I can't seem to reproduce the issue.

salianifo commented 4 weeks ago

I can confirm this happens on Linux Mint 21.3 - X11 - Forward+ Vulkan - 4.3.stable (standard version), I have also been experiencing inconsistent focus issues running my project that were not present in 4.2, though I am experiencing it with my game in windowed mode (have not tested fullscreen).

salianifo commented 3 weeks ago

My issue must be unrelated as I bisected this to #93682 being the cause on my system, which is specifically for X11.