Fix layer-shell version selection logic
If an app blindly binds a global, it may crash if the compositor supports slightly newer version of the protocol.
This commit is contained in:
parent
9816f32bc4
commit
31ce504f99
|
@ -35,7 +35,7 @@ void QWaylandLayerShellIntegration::registryLayer(void *data, struct wl_registry
|
||||||
QWaylandLayerShellIntegration *shell = static_cast<QWaylandLayerShellIntegration *>(data);
|
QWaylandLayerShellIntegration *shell = static_cast<QWaylandLayerShellIntegration *>(data);
|
||||||
|
|
||||||
if (interface == zwlr_layer_shell_v1_interface.name)
|
if (interface == zwlr_layer_shell_v1_interface.name)
|
||||||
shell->m_layerShell = new QWaylandLayerShell(new QtWayland::zwlr_layer_shell_v1(registry, id, version));
|
shell->m_layerShell = new QWaylandLayerShell(new QtWayland::zwlr_layer_shell_v1(registry, id, std::min(version, 3u)));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue