mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 13:31:29 +11:00
Implement set_window_position for x11
This commit is contained in:
parent
d08c94daac
commit
eee9e298ba
|
@ -1356,6 +1356,7 @@ extern "C" {
|
||||||
only_if_exists: Bool) -> Atom;
|
only_if_exists: Bool) -> Atom;
|
||||||
pub fn XKeycodeToKeysym(display: *mut Display, keycode: KeyCode,
|
pub fn XKeycodeToKeysym(display: *mut Display, keycode: KeyCode,
|
||||||
index: libc::c_int) -> KeySym;
|
index: libc::c_int) -> KeySym;
|
||||||
|
pub fn XMoveWindow(display: *mut Display, w: Window, x: libc::c_int, y: libc::c_int);
|
||||||
pub fn XMapWindow(display: *mut Display, w: Window);
|
pub fn XMapWindow(display: *mut Display, w: Window);
|
||||||
pub fn XNextEvent(display: *mut Display, event_return: *mut XEvent);
|
pub fn XNextEvent(display: *mut Display, event_return: *mut XEvent);
|
||||||
pub fn XOpenDisplay(display_name: *const libc::c_char) -> *mut Display;
|
pub fn XOpenDisplay(display_name: *const libc::c_char) -> *mut Display;
|
||||||
|
|
|
@ -197,7 +197,7 @@ impl Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_position(&self, x: uint, y: uint) {
|
pub fn set_position(&self, x: uint, y: uint) {
|
||||||
unimplemented!()
|
unsafe { ffi::XMoveWindow(self.display, self.window, x as libc::c_int, y as libc::c_int) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_inner_size(&self) -> Option<(uint, uint)> {
|
pub fn get_inner_size(&self) -> Option<(uint, uint)> {
|
||||||
|
|
Loading…
Reference in a new issue