summaryrefslogtreecommitdiff
path: root/src/Fl_Widget_Surface.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2018-05-06 07:14:13 +0000
committerManolo Gouy <Manolo>2018-05-06 07:14:13 +0000
commit5c16dcb65bfd8831a6834589fcfe5d5854386098 (patch)
tree5b1abc66856de9dd36ce65c75467b842969d4289 /src/Fl_Widget_Surface.cxx
parentaab1b72af4924293ffc2fa74180480dc9afcc06f (diff)
Simplify Fl_XXX_Window_Driver::capture_titlebar_and_borders() using Fl_Image::scale().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12902 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Widget_Surface.cxx')
-rw-r--r--src/Fl_Widget_Surface.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Fl_Widget_Surface.cxx b/src/Fl_Widget_Surface.cxx
index f255164fc..d52d9f641 100644
--- a/src/Fl_Widget_Surface.cxx
+++ b/src/Fl_Widget_Surface.cxx
@@ -185,7 +185,7 @@ int Fl_Widget_Surface::printable_rect(int *w, int *h) {return 1;}
*/
void Fl_Widget_Surface::draw_decorated_window(Fl_Window *win, int x_offset, int y_offset)
{
- Fl_Shared_Image *top=0, *left=0, *bottom=0, *right=0;
+ Fl_RGB_Image *top=0, *left=0, *bottom=0, *right=0;
if (win->border() && !win->parent()) {
win->driver()->capture_titlebar_and_borders(top, left, bottom, right);
}
@@ -193,19 +193,19 @@ void Fl_Widget_Surface::draw_decorated_window(Fl_Window *win, int x_offset, int
int toph = top ? top->h() : 0;
if (top) {
top->draw(x_offset, y_offset);
- top->release();
+ delete top;
}
if (left) {
left->draw(x_offset, y_offset + toph);
- left->release();
+ delete left;
}
if (right) {
right->draw(x_offset + wsides + win->w(), y_offset + toph);
- right->release();
+ delete right;
}
if (bottom) {
bottom->draw(x_offset, y_offset + toph + win->h());
- bottom->release();
+ delete bottom;
}
this->draw(win, x_offset + wsides, y_offset + toph);
}