mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 13:31:29 +11:00
Fix X11 on 32bit architectures (#311)
* Add an i386 target to travis * Fix X11 on 32bit architectures One would hope 32bit X11 was dead by now but apparently not :). Fix the window hint setting code to not assume window IDs are 64bit as apparently they are not in 32bit arches.
This commit is contained in:
parent
5af88d97e8
commit
1db92063d9
|
@ -12,10 +12,15 @@ install:
|
||||||
if [ $TRAVIS_OS_NAME = osx ]; then
|
if [ $TRAVIS_OS_NAME = osx ]; then
|
||||||
rustup target add x86_64-apple-ios
|
rustup target add x86_64-apple-ios
|
||||||
fi
|
fi
|
||||||
|
- |
|
||||||
|
if [ $TRAVIS_OS_NAME = linux ]; then
|
||||||
|
rustup target add i686-unknown-linux-gnu
|
||||||
|
fi
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- cargo build --verbose
|
- cargo build --verbose
|
||||||
- if [ $TRAVIS_OS_NAME = osx ]; then cargo build --target x86_64-apple-ios --verbose; fi
|
- if [ $TRAVIS_OS_NAME = osx ]; then cargo build --target x86_64-apple-ios --verbose; fi
|
||||||
|
- if [ $TRAVIS_OS_NAME = linux ]; then cargo build --target i686-unknown-linux-gnu --verbose; fi
|
||||||
- cargo test --verbose
|
- cargo test --verbose
|
||||||
|
|
||||||
os:
|
os:
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Unreleased
|
# Unreleased
|
||||||
|
|
||||||
- Fixed issue of calls to `set_inner_size` blocking on Windows.
|
- Fixed issue of calls to `set_inner_size` blocking on Windows.
|
||||||
|
- Fixed the X11 backed on 32bit targets
|
||||||
|
|
||||||
# Version 0.8.2 (2017-09-28)
|
# Version 0.8.2 (2017-09-28)
|
||||||
|
|
||||||
|
|
|
@ -251,7 +251,7 @@ impl Window2 {
|
||||||
Ok(window)
|
Ok(window)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_netwm(display: &Arc<XConnection>, window: u64, root: u64, property: &str, val: bool) {
|
fn set_netwm(display: &Arc<XConnection>, window: ffi::Window, root: ffi::Window, property: &str, val: bool) {
|
||||||
let state_atom = unsafe {
|
let state_atom = unsafe {
|
||||||
with_c_str("_NET_WM_STATE", |state|
|
with_c_str("_NET_WM_STATE", |state|
|
||||||
(display.xlib.XInternAtom)(display.display, state, 0)
|
(display.xlib.XInternAtom)(display.display, state, 0)
|
||||||
|
@ -276,7 +276,7 @@ impl Window2 {
|
||||||
data: {
|
data: {
|
||||||
let mut data = ffi::ClientMessageData::new();
|
let mut data = ffi::ClientMessageData::new();
|
||||||
// This first `long` is the action; `1` means add/set following property.
|
// This first `long` is the action; `1` means add/set following property.
|
||||||
data.set_long(0, val as i64);
|
data.set_long(0, val as c_long);
|
||||||
// This second `long` is the property to set (fullscreen)
|
// This second `long` is the property to set (fullscreen)
|
||||||
data.set_long(1, atom as c_long);
|
data.set_long(1, atom as c_long);
|
||||||
data
|
data
|
||||||
|
|
Loading…
Reference in a new issue