Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a game with ebiten.SetRunnableOnUnfocused(false) doesn't show a window on ChromeOS Linux environment #3091

Closed
1 of 11 tasks
divVerent opened this issue Sep 10, 2024 · 7 comments

Comments

@divVerent
Copy link
Contributor

Ebitengine Version

813e3b2

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • PlayStation 5
  • Xbox
  • Web Browsers

Go Version (go version)

go version go1.23.0 linux/amd64

What steps will reproduce the problem?

Apply this change:

diff --git a/examples/keyboard/main.go b/examples/keyboard/main.go
index 3f5b00206..612bf5865 100644
--- a/examples/keyboard/main.go
+++ b/examples/keyboard/main.go
@@ -102,6 +102,7 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
 }
 
 func main() {
+       ebiten.SetRunnableOnUnfocused(false)
        ebiten.SetWindowSize(screenWidth*2, screenHeight*2)
        ebiten.SetWindowTitle("Keyboard (Ebitengine Demo)")
        if err := ebiten.RunGame(&Game{}); err != nil {

Then run the "keyboard" example.

What is the expected result?

Keyboard window comes up.

What happens instead?

Program hangs "forever".

Anything else you feel useful to add?

Issue is specific to ChromeOS. It happens neither on Linux/X.org nor on Linux/Wayland/XWayland.

I have not tested, but it might be reproducible if one finds a way to run ChromeOS's "sommelier" server on desktop Linux too.

@divVerent divVerent added the bug label Sep 10, 2024
divVerent added a commit to divVerent/aaaaxy that referenced this issue Sep 10, 2024
Ebitengine-side bug: hajimehoshi/ebiten#3091

Workaround is simply enabling --runnable_when_unfocused when on
ChromeOS.

Fixes issue #394.
@hajimehoshi hajimehoshi added this to the v2.8.0 milestone Sep 11, 2024
@hajimehoshi
Copy link
Owner

Confirmed.

@hajimehoshi
Copy link
Owner

Another reproducible case is

go run ./examples/windowsize/ -runnableonunfocused=false

@hajimehoshi
Copy link
Owner

99ffe09 should fix the issue.

@divVerent
Copy link
Contributor Author

Thank you!

divVerent added a commit to divVerent/aaaaxy that referenced this issue Sep 14, 2024
@hajimehoshi
Copy link
Owner

@divVerent Do you want me to cherry-pick this fix to the stable branch?

@divVerent
Copy link
Contributor Author

Not needed for me in particular - if it'll be in the next major release, this change seems self contained enough that I can keep cherrpicking it on top of the stable releases.

Having said that - it's probably a good idea to merge it into Ebitengine stable, simply because it makes Chrome OS support more reliable in general. Not sure if this also fixes operation with some specific X11 window managers.

@hajimehoshi
Copy link
Owner

Well, then I will not merge the fix, since I cannot say that any changes are 100% safe and the fix itself might cause another issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants