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

wlserver_set_xwayland_server_mode sets no mode to X now #571

Closed
misyltoad opened this issue Jul 27, 2022 · 4 comments · Fixed by #573 or #596
Closed

wlserver_set_xwayland_server_mode sets no mode to X now #571

misyltoad opened this issue Jul 27, 2022 · 4 comments · Fixed by #573 or #596

Comments

@misyltoad
Copy link
Collaborator

Sometimes when we call wlserver_set_xwayland_server_mode to try to get the first xwayland server to resize to the output size, we never find any resources that match the client of the xserver so it never gets updated.

if ( wl_resource_get_client( resource ) == client ) always returns false.
Seems to persist across a instance of running gamescope. We either end up doing it every time or never.

I am not sure why yet. Maybe @emersion would have an idea?

@misyltoad
Copy link
Collaborator Author

Nvm, this is actually 100% consistent if you plug in after... Wonder if it's related to us setting the output info and calling wlr_output_create_global(wlserver.wlr.output); now or whatever.

@misyltoad
Copy link
Collaborator Author

Commenting out the wlserver_set_output_info in drm.cpp fixes it.

Not sure how to properly fix it though and retain the property updating.

@misyltoad misyltoad changed the title Sometimes wlserver_set_xwayland_server_mode sets no mode wlserver_set_xwayland_server_mode sets no mode to X now Jul 27, 2022
@misyltoad
Copy link
Collaborator Author

Yeah this makes sense, wlr_output_destroy_global does this:

	// Make all output resources inert
	struct wl_resource *resource, *tmp;
	wl_resource_for_each_safe(resource, tmp, &output->resources) {
		wl_resource_set_user_data(resource, NULL);
		wl_list_remove(wl_resource_get_link(resource));
		wl_list_init(wl_resource_get_link(resource));
	}

@emersion
Copy link
Collaborator

Hm. Maybe we can install a global filter and create one wl_output global per Xwayland, instead of sending fake events?

emersion added a commit to emersion/gamescope that referenced this issue Jul 29, 2022
emersion added a commit to emersion/gamescope that referenced this issue Aug 24, 2022
@emersion emersion reopened this Aug 24, 2022
emersion added a commit to emersion/gamescope that referenced this issue Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants