Repository navigation
wlr: expose XwaylandSurface pid - #7
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
XwaylandSurface.PID, a plain accessor for the existingwlr_xwayland_surface.pidfield. wlroots fills that field in when the surface is created by asking the X server for the owning client's PID through the XRes extension.There was no other way to get an X client's PID through the bindings. The
wl_clientbehind an Xwayland surface is Xwayland itself, sowl_client_get_credentialsreturns the Xwayland server's PID, not the X client's. kawa needs the real PID to match a newly mapped X window to the process it started from the New menu.Verified with
go build ./...andgo vet ./...against wlroots 0.20.2, and by running kawa against this branch: anxclockstarted from New now maps with its own PID (map view title="xclock" pid=491447, matching the child kawa started) instead of -1.