rename the field

This commit is contained in:
Determinant 2017-07-12 13:26:11 -04:00
parent 8e13f85fac
commit d6b9faacc9

View file

@ -701,7 +701,7 @@ impl Window2 {
x_events_loop.windows.lock().unwrap().insert(win.id(), WindowData { x_events_loop.windows.lock().unwrap().insert(win.id(), WindowData {
im: im, im: im,
ic: ic, ic: ic,
spot: ffi::XPoint {x: 0, y: 0}, ic_spot: ffi::XPoint {x: 0, y: 0},
config: None, config: None,
multitouch: window.multitouch, multitouch: window.multitouch,
cursor_pos: None, cursor_pos: None,
@ -725,10 +725,10 @@ impl Window2 {
let nspot = ffi::XPoint{x: x, y: y}; let nspot = ffi::XPoint{x: x, y: y};
let mut windows = windows.lock().unwrap(); let mut windows = windows.lock().unwrap();
let mut w = windows.get_mut(&self.window.id()).unwrap(); let mut w = windows.get_mut(&self.window.id()).unwrap();
if w.spot.x == x && w.spot.y == y { if w.ic_spot.x == x && w.ic_spot.y == y {
return return
} }
w.spot = nspot; w.ic_spot = nspot;
unsafe { unsafe {
let preedit_attr = (display.xlib.XVaCreateNestedList) let preedit_attr = (display.xlib.XVaCreateNestedList)
(0, b"spotLocation\0", &nspot, ptr::null::<()>()); (0, b"spotLocation\0", &nspot, ptr::null::<()>());
@ -759,7 +759,7 @@ struct WindowData {
config: Option<WindowConfig>, config: Option<WindowConfig>,
im: ffi::XIM, im: ffi::XIM,
ic: ffi::XIC, ic: ffi::XIC,
spot: ffi::XPoint, ic_spot: ffi::XPoint,
multitouch: bool, multitouch: bool,
cursor_pos: Option<(f64, f64)>, cursor_pos: Option<(f64, f64)>,
} }