Author: manolo
Date: 2011-04-19 01:22:05 -0700 (Tue, 19 Apr 2011)
New Revision: 8607
Log:
Misc code cleaning.
Modified:
branches/branch-1.3/src/Fl_cocoa.mm
Modified: branches/branch-1.3/src/Fl_cocoa.mm
===================================================================
--- branches/branch-1.3/src/Fl_cocoa.mm 2011-04-18 20:47:32 UTC (rev 8606)
+++ branches/branch-1.3/src/Fl_cocoa.mm 2011-04-19 08:22:05 UTC (rev 8607)
@@ -1523,11 +1523,10 @@
if (w->border() && !w->parent()) {
if (w->maxw != w->minw || w->maxh != w->minh) {
ret = 2;
- get_window_frame_sizes(bx, by, bt);
} else {
ret = 1;
- get_window_frame_sizes(bx, by, bt);
}
+ get_window_frame_sizes(bx, by, bt);
}
// The coordinates of the whole window, including non-client area
xoff = bx;
@@ -3394,7 +3393,7 @@
int Fl_Window::decorated_w()
{
- if (this->parent() || !border()) return w();
+ if (parent() || !border()) return w();
int bx, by, bt;
get_window_frame_sizes(bx, by, bt);
return w() + 2 * bx;
@@ -3402,7 +3401,7 @@
int Fl_Window::decorated_h()
{
- if (this->parent() || !border()) return h();
+ if (parent() || !border()) return h();
int bx, by, bt;
get_window_frame_sizes(bx, by, bt);
return h() + bt + by;
@@ -3410,7 +3409,7 @@
void Fl_Paged_Device::print_window(Fl_Window *win, int x_offset, int y_offset)
{
- if (win->parent() || !win->border()) {
+ if (!win->shown() || win->parent() || !win->border()) {
this->print_widget(win, x_offset, y_offset);
return;
}
@@ -3424,7 +3423,7 @@
// capture the window title bar from screen
CGImageRef img = Fl_X::CGImage_from_window_rect(win, 0, -bt, win->w(), bt);
this->set_current(); // back to the Fl_Paged_Device
- CGRect rect = { { 0, 1 }, { win->w(), bt } }; // print the title bar
+ CGRect rect = { { 0, 0 }, { win->w(), bt } }; // print the title bar
Fl_X::q_begin_image(rect, 0, 0, win->w(), bt);
CGContextDrawImage(fl_gc, rect, img);
Fl_X::q_end_image();
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit