kms: Allow updating the primary node
Add more sophisticated code to handle the primary node disappearing. Also overhaul the selection logic to respect our allow/deny-list and prefer devices with built-in connectors before using the boot gpu. This will also allow triggering a primary node switch at runtime for debugging purposes in the future.
This commit is contained in:
parent
4c0c61e94b
commit
8194be30c6
8 changed files with 153 additions and 93 deletions
|
|
@ -104,7 +104,7 @@ pub fn screenshot_window(state: &mut State, surface: &CosmicSurface) {
|
|||
.backend
|
||||
.offscreen_renderer(|kms| {
|
||||
advertised_node_for_surface(&wl_surface, &state.common.display_handle)
|
||||
.or(kms.primary_node)
|
||||
.or(*kms.primary_node.read().unwrap())
|
||||
})
|
||||
.with_context(|| "Failed to get renderer for screenshot")
|
||||
.and_then(|renderer| match renderer {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue