minecraft-wayland icon indicating copy to clipboard operation
minecraft-wayland copied to clipboard

swaywm: Disappearing window unless joining game in fullscreen mode

Open mazunki opened this issue 1 year ago • 3 comments

I'm not sure if this is specific to Sway, but I somehow need to put the game into fullscreen before I join a game, or the game window disappears into oblivion. If I fullscreen the game first, then I can windowize it afterwards just fine.

The game doesn't crash, and I can still hear the music, but somehow the surface is nowhere to be found. I have a feeling this is due to a new opengl context replacing the old window, or something, and I would like to report it to Sway, but I don't really understand it well enough to make a proper report.

If anyone has any ideas, I'm happy to test them out.

mazunki avatar Apr 29 '24 07:04 mazunki

Some more notes: from swaymsg -t get_tree I get the following tree:

{
	"id": 109,
	"type": "floating_con",
	"orientation": "none",
	"percent": 0.19320427901081824,
	"urgent": false,
	"marks": [],
	"focused": false,
	"layout": "none",
	"border": "pixel",
	"current_border_width": 2,
	"rect": {
		"x": 3092,
		"y": 277,
		"width": 1182,
		"height": 1300
	},
	"deco_rect": {
		"x": 0,
		"y": 0,
		"width": 0,
		"height": 0
	},
	"window_rect": {
		"x": 2,
		"y": 2,
		"width": 1178,
		"height": 1296
	},
	"geometry": {
		"x": 0,
		"y": 0,
		"width": 854,
		"height": 480
	},
	"name": "GT: New Horizons 2.6.0",
	"window": null,
	"nodes": [],
	"floating_nodes": [],
	"focus": [],
	"fullscreen_mode": 0,
	"sticky": false,
	"pid": 8769,
	"app_id": "",
	"visible": true,
	"max_render_time": 0,
	"shell": "xdg_shell",
	"inhibit_idle": false,
	"idle_inhibitors": {
		"user": "none",
		"application": "none"
	}
}

After the window disappears, there is no window with name nor id anymore. Using full-screen doesn't always work either, sometimes it's not necessary. It's a bit unpredictable.

mazunki avatar Apr 29 '24 10:04 mazunki

It also happens when reloading resource packs.

mazunki avatar Apr 29 '24 11:04 mazunki

Ive had this happen even in fullscreen. Switching back to X seems to fix it, but that defeats the point of having wayland. Tried compiling the upstream glfw version and it still does it. It seems to actually work at random though. Very weird

mineland-2048 avatar Jul 28 '24 03:07 mineland-2048