Cargo.toml: include repo, update nix/image
This commit is contained in:
parent
5884162082
commit
ce844ba9f8
|
@ -17,7 +17,7 @@ use matrix, this room is also bridged to gitter: https://gitter.im/smithay/Lobby
|
||||||
Smithay attempts to be as generic and un-opinionated as possible. As such, if you have an idea of a feature that would be usefull
|
Smithay attempts to be as generic and un-opinionated as possible. As such, if you have an idea of a feature that would be usefull
|
||||||
for your compositor project and would like it to be integrated in Smithay, please consider whether it is in its scope:
|
for your compositor project and would like it to be integrated in Smithay, please consider whether it is in its scope:
|
||||||
|
|
||||||
- If this is a very generic feature that probably many different projects would find usefull, it can be integrated in Smithay
|
- If this is a very generic feature that probably many different projects would find useful, it can be integrated in Smithay
|
||||||
- If it is a rather specific feature, but can be framed as a special case of a more general feature, this general feature is
|
- If it is a rather specific feature, but can be framed as a special case of a more general feature, this general feature is
|
||||||
likely worth adding to Smithay
|
likely worth adding to Smithay
|
||||||
- If this feature is really specific to your use-case, it is out of scope for Smithay
|
- If this feature is really specific to your use-case, it is out of scope for Smithay
|
||||||
|
|
|
@ -4,10 +4,11 @@ version = "0.1.0"
|
||||||
authors = ["Victor Berger <victor.berger@m4x.org>", "Drakulix (Victor Brekenfeld)"]
|
authors = ["Victor Berger <victor.berger@m4x.org>", "Drakulix (Victor Brekenfeld)"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
description = "Smithay is a library for writing wayland compositors."
|
description = "Smithay is a library for writing wayland compositors."
|
||||||
|
repository = "https://github.com/Smithay/smithay"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
wayland-server = "0.10.2"
|
wayland-server = "0.10.2"
|
||||||
nix = "0.7.0"
|
nix = "0.9.0"
|
||||||
xkbcommon = "0.2.1"
|
xkbcommon = "0.2.1"
|
||||||
tempfile = "2.1.5"
|
tempfile = "2.1.5"
|
||||||
slog = { version = "2.0.0" }
|
slog = { version = "2.0.0" }
|
||||||
|
@ -21,7 +22,7 @@ glium = { version = "0.17.1", optional = true, default-features = false }
|
||||||
input = { version = "0.2.0", optional = true }
|
input = { version = "0.2.0", optional = true }
|
||||||
rental = "0.4.11"
|
rental = "0.4.11"
|
||||||
wayland-protocols = { version = "0.10.2", features = ["unstable_protocols", "server"] }
|
wayland-protocols = { version = "0.10.2", features = ["unstable_protocols", "server"] }
|
||||||
image = "0.15.0"
|
image = "0.16.0"
|
||||||
error-chain = "0.11.0"
|
error-chain = "0.11.0"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|
|
@ -6,7 +6,7 @@ use drm::control::{Device, ResourceInfo};
|
||||||
use drm::control::{connector, crtc, encoder, framebuffer, Mode};
|
use drm::control::{connector, crtc, encoder, framebuffer, Mode};
|
||||||
use gbm::{BufferObject, BufferObjectFlags, Format as GbmFormat, Surface as GbmSurface, SurfaceBufferHandle};
|
use gbm::{BufferObject, BufferObjectFlags, Format as GbmFormat, Surface as GbmSurface, SurfaceBufferHandle};
|
||||||
use image::{ImageBuffer, Rgba};
|
use image::{ImageBuffer, Rgba};
|
||||||
use nix::c_void;
|
use nix::libc::c_void;
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ use super::GraphicsBackend;
|
||||||
#[cfg(feature = "backend_drm")]
|
#[cfg(feature = "backend_drm")]
|
||||||
use gbm::{AsRaw, Device as GbmDevice, Surface as GbmSurface};
|
use gbm::{AsRaw, Device as GbmDevice, Surface as GbmSurface};
|
||||||
use libloading::Library;
|
use libloading::Library;
|
||||||
use nix::{c_int, c_void};
|
use nix::libc::{c_int, c_void};
|
||||||
use rental::TryNewError;
|
use rental::TryNewError;
|
||||||
use slog;
|
use slog;
|
||||||
use std::error;
|
use std::error;
|
||||||
|
@ -28,8 +28,7 @@ use winit::os::unix::WindowExt;
|
||||||
|
|
||||||
#[allow(non_camel_case_types, dead_code)]
|
#[allow(non_camel_case_types, dead_code)]
|
||||||
mod ffi {
|
mod ffi {
|
||||||
use nix::c_void;
|
use nix::libc::{c_long, c_void, int32_t, uint64_t};
|
||||||
use nix::libc::{c_long, int32_t, uint64_t};
|
|
||||||
|
|
||||||
pub type khronos_utime_nanoseconds_t = khronos_uint64_t;
|
pub type khronos_utime_nanoseconds_t = khronos_uint64_t;
|
||||||
pub type khronos_uint64_t = uint64_t;
|
pub type khronos_uint64_t = uint64_t;
|
||||||
|
|
|
@ -8,7 +8,7 @@ use backend::input::{Axis, AxisSource, Event as BackendEvent, InputBackend, Inpu
|
||||||
KeyboardKeyEvent, MouseButton, MouseButtonState, PointerAxisEvent, PointerButtonEvent,
|
KeyboardKeyEvent, MouseButton, MouseButtonState, PointerAxisEvent, PointerButtonEvent,
|
||||||
PointerMotionAbsoluteEvent, Seat, SeatCapabilities, TouchCancelEvent, TouchDownEvent,
|
PointerMotionAbsoluteEvent, Seat, SeatCapabilities, TouchCancelEvent, TouchDownEvent,
|
||||||
TouchMotionEvent, TouchSlot, TouchUpEvent, UnusedEvent};
|
TouchMotionEvent, TouchSlot, TouchUpEvent, UnusedEvent};
|
||||||
use nix::c_void;
|
use nix::libc::c_void;
|
||||||
use rental::TryNewError;
|
use rental::TryNewError;
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use std::cmp;
|
use std::cmp;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
|
|
||||||
use nix::{c_int, c_void, libc, unistd};
|
use nix::{libc, unistd};
|
||||||
use nix::sys::mman;
|
use nix::sys::mman;
|
||||||
use nix::sys::signal::{self, SigAction, SigHandler, Signal};
|
use nix::sys::signal::{self, SigAction, SigHandler, Signal};
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
|
@ -210,7 +210,7 @@ unsafe fn reraise_sigbus() {
|
||||||
let _ = signal::raise(Signal::SIGBUS);
|
let _ = signal::raise(Signal::SIGBUS);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" fn sigbus_handler(_signum: c_int, info: *mut libc::siginfo_t, _context: *mut c_void) {
|
extern "C" fn sigbus_handler(_signum: libc::c_int, info: *mut libc::siginfo_t, _context: *mut libc::c_void) {
|
||||||
let faulty_ptr = unsafe { siginfo_si_addr(info) } as *mut u8;
|
let faulty_ptr = unsafe { siginfo_si_addr(info) } as *mut u8;
|
||||||
SIGBUS_GUARD.with(|guard| {
|
SIGBUS_GUARD.with(|guard| {
|
||||||
let (memmap, _) = guard.get();
|
let (memmap, _) = guard.get();
|
||||||
|
@ -238,7 +238,7 @@ extern "C" fn sigbus_handler(_signum: c_int, info: *mut libc::siginfo_t, _contex
|
||||||
// I guess it's good enough?
|
// I guess it's good enough?
|
||||||
|
|
||||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||||
unsafe fn siginfo_si_addr(info: *mut libc::siginfo_t) -> *mut c_void {
|
unsafe fn siginfo_si_addr(info: *mut libc::siginfo_t) -> *mut libc::c_void {
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
struct siginfo_t {
|
struct siginfo_t {
|
||||||
a: [libc::c_int; 3], // si_signo, si_errno, si_code
|
a: [libc::c_int; 3], // si_signo, si_errno, si_code
|
||||||
|
@ -249,6 +249,6 @@ unsafe fn siginfo_si_addr(info: *mut libc::siginfo_t) -> *mut c_void {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(any(target_os = "linux", target_os = "android")))]
|
#[cfg(not(any(target_os = "linux", target_os = "android")))]
|
||||||
unsafe fn siginfo_si_addr(info: *mut libc::siginfo_t) -> *mut c_void {
|
unsafe fn siginfo_si_addr(info: *mut libc::siginfo_t) -> *mut libc::c_void {
|
||||||
(*info).si_addr
|
(*info).si_addr
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue