bugfix(x11): Use the right atom type in focus_window()
Closes #3248 by removing an Xlibism I forgot about Signed-off-by: John Nunley <dev@notgull.net>
This commit is contained in:
parent
e9784127df
commit
da947992ac
5 changed files with 60 additions and 7 deletions
|
|
@ -1,6 +1 @@
|
|||
use x11_dl::xmd::CARD32;
|
||||
pub use x11_dl::{error::OpenError, xcursor::*, xinput2::*, xlib::*, xlib_xcb::*};
|
||||
|
||||
// Isn't defined by x11_dl
|
||||
#[allow(non_upper_case_globals)]
|
||||
pub const IconicState: CARD32 = 3;
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ use crate::{
|
|||
// Xinput constants not defined in x11rb
|
||||
const ALL_DEVICES: u16 = 0;
|
||||
const ALL_MASTER_DEVICES: u16 = 1;
|
||||
const ICONIC_STATE: u32 = 3;
|
||||
|
||||
type X11Source = Generic<BorrowedFd<'static>>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1785,9 +1785,9 @@ impl UnownedWindow {
|
|||
let state_type_atom = atoms[CARD32];
|
||||
let is_minimized = if let Ok(state) =
|
||||
self.xconn
|
||||
.get_property(self.xwindow, state_atom, state_type_atom)
|
||||
.get_property::<u32>(self.xwindow, state_atom, state_type_atom)
|
||||
{
|
||||
state.contains(&(ffi::IconicState as c_ulong))
|
||||
state.contains(&super::ICONIC_STATE)
|
||||
} else {
|
||||
false
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue