summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Window.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx
index b9860976a..2bc536556 100644
--- a/src/Fl_Window.cxx
+++ b/src/Fl_Window.cxx
@@ -119,7 +119,7 @@ Fl_Window* Fl_Widget::top_window_offset(int& xoff, int& yoff) const {
yoff += w->y();
w = w->window(); // walk up window hierarchy
}
- return ((Fl_Widget*)w)->as_window();
+ return const_cast<Fl_Widget*>(w)->as_window();
}
/** Gets the x position of the window on the screen */