diff options
| author | Manolo Gouy <Manolo> | 2011-04-19 08:22:05 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-04-19 08:22:05 +0000 |
| commit | d4685c13eff068817031b768ecdf930961c361c5 (patch) | |
| tree | 1b5a50e6d13a04e5c932927eca4901a9533398b0 | |
| parent | 1ad8cf320da6f8ce917c4f0f962dc9c9fef019da (diff) | |
Misc code cleaning.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8607 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | src/Fl_cocoa.mm | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index e692822d5..94ecc8372 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -1523,11 +1523,10 @@ int Fl_X::fake_X_wm(const Fl_Window* w,int &X,int &Y, int &bt,int &bx, int &by) 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 @@ Window fl_xid(const Fl_Window* w) 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_w() 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 @@ int Fl_Window::decorated_h() 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 @@ void Fl_Paged_Device::print_window(Fl_Window *win, int x_offset, int y_offset) // 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(); |
