On X11, allow building window with parent
This commit is contained in:
parent
bb0f965c57
commit
71094e5703
6 changed files with 104 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
use std::os::raw;
|
||||
use std::{ptr, sync::Arc};
|
||||
|
||||
use crate::window::WindowId;
|
||||
use crate::{
|
||||
event_loop::{EventLoopBuilder, EventLoopWindowTarget},
|
||||
monitor::MonitorHandle,
|
||||
|
|
@ -171,6 +172,8 @@ pub trait WindowBuilderExtX11 {
|
|||
fn with_x11_visual<T>(self, visual_infos: *const T) -> Self;
|
||||
|
||||
fn with_x11_screen(self, screen_id: i32) -> Self;
|
||||
/// Build window with parent window.
|
||||
fn with_parent(self, parent_id: WindowId) -> Self;
|
||||
|
||||
/// Build window with the given `general` and `instance` names.
|
||||
///
|
||||
|
|
@ -227,6 +230,12 @@ impl WindowBuilderExtX11 for WindowBuilder {
|
|||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn with_parent(mut self, parent_id: WindowId) -> Self {
|
||||
self.platform_specific.parent_id = Some(parent_id.0);
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn with_override_redirect(mut self, override_redirect: bool) -> Self {
|
||||
self.platform_specific.override_redirect = override_redirect;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue