Skip to content

Commit 4d66451

Browse files
committed
set_mouse_cursor self set to mut to follow the x11 impl
1 parent f941386 commit 4d66451

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/macos/window.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,7 @@ impl Window {
299299
window_handle
300300
}
301301

302-
pub fn close(&mut self) {
303-
self.close_requested = true;
304-
}
305-
306-
pub fn set_mouse_cursor(&self, cursor: MouseCursor) {
302+
pub fn set_mouse_cursor(&mut self, cursor: MouseCursor) {
307303
let native_cursor = Cursor::from(cursor);
308304
unsafe {
309305
let bounds: NSRect = msg_send![self.ns_view as id, bounds];
@@ -315,6 +311,10 @@ impl Window {
315311
}
316312
}
317313

314+
pub fn close(&mut self) {
315+
self.close_requested = true;
316+
}
317+
318318
#[cfg(feature = "opengl")]
319319
pub fn gl_context(&self) -> Option<&GlContext> {
320320
self.gl_context.as_ref()

src/win/window.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ impl Window {
601601
}
602602
}
603603

604-
pub fn set_mouse_cursor(&self, cursor: MouseCursor) {
604+
pub fn set_mouse_cursor(&mut self, cursor: MouseCursor) {
605605
//@TODO: Implement
606606
}
607607

src/window.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl<'a> Window<'a> {
100100
}
101101

102102
/// Set the cursor to the given cursor type
103-
pub fn set_mouse_cursor(&self, cursor: MouseCursor) {
103+
pub fn set_mouse_cursor(&mut self, cursor: MouseCursor) {
104104
self.window.set_mouse_cursor(cursor);
105105
}
106106

0 commit comments

Comments
 (0)