output_configuration: Allow setting xwayland primary output
This commit is contained in:
parent
2e7d051816
commit
2a3bd84e22
4 changed files with 46 additions and 2 deletions
|
|
@ -58,6 +58,8 @@ pub trait OutputConfigurationHandler: Sized {
|
|||
|
||||
fn test_configuration(&mut self, conf: Vec<(Output, OutputConfiguration)>) -> bool;
|
||||
fn apply_configuration(&mut self, conf: Vec<(Output, OutputConfiguration)>) -> bool;
|
||||
|
||||
fn request_xwayland_primary(&mut self, output: Option<Output>);
|
||||
}
|
||||
|
||||
pub struct OutputMngrGlobalData {
|
||||
|
|
@ -189,7 +191,7 @@ where
|
|||
);
|
||||
|
||||
let extension_global = dh.create_global::<D, ZcosmicOutputManagerV1, _>(
|
||||
2,
|
||||
3,
|
||||
OutputMngrGlobalData {
|
||||
filter: Box::new(client_filter),
|
||||
},
|
||||
|
|
@ -505,6 +507,14 @@ where
|
|||
instance.obj.model(physical.model);
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(extension_obj) = instance.extension_obj.as_ref() {
|
||||
if inner.enabled
|
||||
&& extension_obj.version() >= zcosmic_output_head_v1::EVT_XWAYLAND_PRIMARY_SINCE
|
||||
{
|
||||
extension_obj.xwayland_primary(output.config().xwayland_primary as u32);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn remove_global_with_timer<D: 'static>(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue