mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-24 17:28:40 +00:00
fix x11 missing pid
This commit is contained in:
parent
b51a28b75f
commit
feee6f62f0
1 changed files with 13 additions and 0 deletions
|
@ -55,6 +55,7 @@ x11rb::atom_manager! {
|
|||
WM_PROTOCOLS,
|
||||
WM_DELETE_WINDOW,
|
||||
WM_CHANGE_STATE,
|
||||
_NET_WM_PID,
|
||||
_NET_WM_NAME,
|
||||
_NET_WM_STATE,
|
||||
_NET_WM_STATE_MAXIMIZED_VERT,
|
||||
|
@ -436,6 +437,18 @@ impl X11WindowState {
|
|||
|
||||
// Collect errors during setup, so that window can be destroyed on failure.
|
||||
let setup_result = maybe!({
|
||||
let pid = std::process::id();
|
||||
check_reply(
|
||||
|| "X11 ChangeProperty for _NET_WM_PID failed.",
|
||||
xcb.change_property32(
|
||||
xproto::PropMode::REPLACE,
|
||||
x_window,
|
||||
atoms._NET_WM_PID,
|
||||
xproto::AtomEnum::CARDINAL,
|
||||
&[pid],
|
||||
),
|
||||
)?;
|
||||
|
||||
if let Some(size) = params.window_min_size {
|
||||
let mut size_hints = WmSizeHints::new();
|
||||
let min_size = (size.width.0 as i32, size.height.0 as i32);
|
||||
|
|
Loading…
Reference in a new issue