summaryrefslogtreecommitdiff
path: root/src/Fl_x.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-01-28 11:51:07 +0000
committerManolo Gouy <Manolo>2016-01-28 11:51:07 +0000
commit1c3c544edf1af6884e4002f04aa28cce4a06fbec (patch)
tree26f72eccf3d60dc04d5026df9678eec7652d33d1 /src/Fl_x.cxx
parente2cc1a80f09b7b33665be2ae14ef20673f9d6f7b (diff)
Added Fl_Window::capture_titlebar_and_borders a new private member function
that triggers a warning when FL_PORTING is ON and with a default platform-neutral implementation. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11074 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_x.cxx')
-rw-r--r--src/Fl_x.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index c8a7620eb..bd13607da 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -3029,16 +3029,16 @@ int Fl_Window::decorated_w()
On the X11 platform, this function exploits a feature of fl_read_image() which, when called
with negative 4th argument, captures the window decoration.
*/
-void Fl_X::capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_RGB_Image*& left, Fl_RGB_Image*& bottom, Fl_RGB_Image*& right)
+void Fl_Window::capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_RGB_Image*& left, Fl_RGB_Image*& bottom, Fl_RGB_Image*& right)
{
top = left = bottom = right = NULL;
- if (w->decorated_h() == w->h()) return;
+ if (decorated_h() == h()) return;
Window from = fl_window;
Fl_Surface_Device *previous = Fl_Surface_Device::surface();
Fl_Display_Device::display_device()->set_current();
- w->show();
+ show();
Fl::check();
- w->make_current();
+ make_current();
Window root, parent, *children, child_win;
unsigned n = 0;
int do_it;
@@ -3050,19 +3050,19 @@ void Fl_X::capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_RGB_Image*& left,
fl_window = parent;
uchar *rgb;
if (htop) {
- rgb = fl_read_image(NULL, 0, 0, - (w->w() + 2 * wsides), htop);
- top = new Fl_RGB_Image(rgb, w->w() + 2 * wsides, htop, 3);
+ rgb = fl_read_image(NULL, 0, 0, - (w() + 2 * wsides), htop);
+ top = new Fl_RGB_Image(rgb, w() + 2 * wsides, htop, 3);
top->alloc_array = 1;
}
if (wsides) {
- rgb = fl_read_image(NULL, 0, htop, -wsides, w->h());
- left = new Fl_RGB_Image(rgb, wsides, w->h(), 3);
+ rgb = fl_read_image(NULL, 0, htop, -wsides, h());
+ left = new Fl_RGB_Image(rgb, wsides, h(), 3);
left->alloc_array = 1;
- rgb = fl_read_image(NULL, w->w() + wsides, htop, -wsides, w->h());
- right = new Fl_RGB_Image(rgb, wsides, w->h(), 3);
+ rgb = fl_read_image(NULL, w() + wsides, htop, -wsides, h());
+ right = new Fl_RGB_Image(rgb, wsides, h(), 3);
right->alloc_array = 1;
- rgb = fl_read_image(NULL, 0, htop + w->h(), -(w->w() + 2*wsides), hbottom);
- bottom = new Fl_RGB_Image(rgb, w->w() + 2*wsides, hbottom, 3);
+ rgb = fl_read_image(NULL, 0, htop + h(), -(w() + 2*wsides), hbottom);
+ bottom = new Fl_RGB_Image(rgb, w() + 2*wsides, hbottom, 3);
bottom->alloc_array = 1;
}
fl_window = from;