Slightly reduce number of cfgs (#3071)
* Make Linux platforms less dependent on the root monitor handle * Add various functions to the Wayland platform to reduce cfgs * Don't use a cfg in listen_device_events * Don't use a cfg in set_content_protected * Fix instance of a target_os cfg
This commit is contained in:
parent
67b041e231
commit
a06ea45c0f
19 changed files with 121 additions and 125 deletions
|
|
@ -706,7 +706,15 @@ impl<T> EventLoopWindowTarget<T> {
|
|||
&self.xconn
|
||||
}
|
||||
|
||||
pub fn set_listen_device_events(&self, allowed: DeviceEvents) {
|
||||
pub fn available_monitors(&self) -> impl Iterator<Item = MonitorHandle> {
|
||||
self.xconn.available_monitors().into_iter().flatten()
|
||||
}
|
||||
|
||||
pub fn primary_monitor(&self) -> Option<MonitorHandle> {
|
||||
self.xconn.primary_monitor().ok()
|
||||
}
|
||||
|
||||
pub fn listen_device_events(&self, allowed: DeviceEvents) {
|
||||
self.device_events.set(allowed);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue