summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2017-11-30 13:55:19 +0000
committerManolo Gouy <Manolo>2017-11-30 13:55:19 +0000
commit08f72d626c9e506cf05fadd2e037e72e97bb95cf (patch)
tree23a0aa6b572bf1cc418ca183b174b6c8c57251c0 /src
parentc354268f4470463c985723f1f721a4a3e9b6e537 (diff)
Fl_Widget_Surface::draw(Fl_Widget *widget,...): clip drawing to the window bounds when widget is a window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12573 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Widget_Surface.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Fl_Widget_Surface.cxx b/src/Fl_Widget_Surface.cxx
index a542eee69..c3cb1fcc0 100644
--- a/src/Fl_Widget_Surface.cxx
+++ b/src/Fl_Widget_Surface.cxx
@@ -62,9 +62,9 @@ void Fl_Widget_Surface::draw(Fl_Widget* widget, int delta_x, int delta_y)
if (new_x != old_x || new_y != old_y) {
translate(new_x - old_x, new_y - old_y );
}
- // if widget is a main window, clip all drawings to the window area
- if (is_window && !widget->window()) {
- fl_push_clip(0, 0, widget->w(), widget->h() );
+ // if widget is a window, clip all drawings to the window area
+ if (is_window) {
+ fl_push_clip(0, 0, widget->w(), widget->h());
}
// we do some trickery to recognize OpenGL windows and draw them via a plugin
int drawn_by_plugin = 0;
@@ -80,7 +80,7 @@ void Fl_Widget_Surface::draw(Fl_Widget* widget, int delta_x, int delta_y)
Fl_Overlay_Window *over = (is_window ? widget->as_window()->as_overlay_window() : NULL);
if (over) over->draw_overlay();
}
- if (is_window && !widget->window()) fl_pop_clip();
+ if (is_window) fl_pop_clip();
// find subwindows of widget and print them
traverse(widget);
// reset origin to where it was