@ -3902,6 +3902,28 @@ int Fl_Cocoa_Window_Driver::set_cursor(const Fl_RGB_Image *image, int hotx, int
@@ -3902,6 +3902,28 @@ int Fl_Cocoa_Window_Driver::set_cursor(const Fl_RGB_Image *image, int hotx, int
@ -3942,8 +3964,13 @@ int Fl_Cocoa_Window_Driver::set_cursor(const Fl_RGB_Image *image, int hotx, int
@@ -3942,8 +3964,13 @@ int Fl_Cocoa_Window_Driver::set_cursor(const Fl_RGB_Image *image, int hotx, int
// scale the printer device so that the window fits on the page
float scale = 1;
printer.printable_rect(&w, &h);
if ([print_with_titlebar_item state] == NSOnState) {
ww = win->decorated_w();
wh = win->decorated_h();
} else {
ww = win->w();
wh = win->h();
}
if (ww>w || wh>h) {
scale = (float)w/win->w();
if ((float)h/wh < scale) scale = (float)h/wh;
@ -3959,7 +3986,10 @@ int Fl_Cocoa_Window_Driver::set_cursor(const Fl_RGB_Image *image, int hotx, int
@@ -3959,7 +3986,10 @@ int Fl_Cocoa_Window_Driver::set_cursor(const Fl_RGB_Image *image, int hotx, int
#else
printer.origin(w/2, h/2);
#endif
printer.print_window(win, -ww/2, -wh/2);
if ([print_with_titlebar_item state] == NSOnState)