diff --git a/src/components/main/platform/common/glut_windowing.rs b/src/components/main/platform/common/glut_windowing.rs index 9e9c5b45956..51819207de1 100644 --- a/src/components/main/platform/common/glut_windowing.rs +++ b/src/components/main/platform/common/glut_windowing.rs @@ -11,7 +11,7 @@ use windowing::{MouseWindowClickEvent, MouseWindowMouseDownEvent, MouseWindowMou use windowing::{Forward, Back}; use alert::{Alert, AlertMethods}; -use std::cell::RefCell; +use std::cell::{Cell, RefCell}; use std::libc::{c_int, c_uchar}; use std::local_data; use std::rc::Rc; @@ -51,12 +51,12 @@ pub struct Window { drag_origin: Point2D, - mouse_down_button: RefCell, - mouse_down_point: RefCell>, + mouse_down_button: Cell, + mouse_down_point: Cell>, - ready_state: RefCell, - render_state: RefCell, - throbber_frame: RefCell, + ready_state: Cell, + render_state: Cell, + throbber_frame: Cell, } impl WindowMethods for Window { @@ -74,12 +74,12 @@ impl WindowMethods for Window { drag_origin: Point2D(0 as c_int, 0), - mouse_down_button: RefCell::new(0), - mouse_down_point: RefCell::new(Point2D(0 as c_int, 0)), + mouse_down_button: Cell::new(0), + mouse_down_point: Cell::new(Point2D(0 as c_int, 0)), - ready_state: RefCell::new(Blank), - render_state: RefCell::new(IdleRenderState), - throbber_frame: RefCell::new(0), + ready_state: Cell::new(Blank), + render_state: Cell::new(IdleRenderState), + throbber_frame: Cell::new(0), }; // Register event handlers.