Module: wine Branch: master Commit: 2546468b4ce14a118fa1771bdc2d54db0668d07a URL: https://gitlab.winehq.org/wine/wine/-/commit/2546468b4ce14a118fa1771bdc2d54d...
Author: Piotr Caban piotr@codeweavers.com Date: Wed Mar 27 13:22:02 2024 +0100
gdi32: Implicitly call StartPage in ExtEscape on printer DC.
---
dlls/gdi32/dc.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index 87335469b9b..0a57d74485e 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -743,16 +743,31 @@ INT WINAPI Escape( HDC hdc, INT escape, INT in_count, const char *in_data, void INT WINAPI ExtEscape( HDC hdc, INT escape, INT input_size, const char *input, INT output_size, char *output ) { - struct print *print; DC_ATTR *dc_attr;
if (is_meta_dc( hdc )) return METADC_ExtEscape( hdc, escape, input_size, input, output_size, output ); if (!(dc_attr = get_dc_attr( hdc ))) return 0; - if ((print = get_dc_print( dc_attr )) && dc_attr->emf) + if (dc_attr->print) { - int ret = EMFDC_ExtEscape( dc_attr, escape, input_size, input, output_size, output ); - if (ret) return ret; + switch (escape) + { + case PASSTHROUGH: + case POSTSCRIPT_DATA: + case GETFACENAME: + case DOWNLOADFACE: + case BEGIN_PATH: + case CLIP_TO_PATH: + case END_PATH: + case DOWNLOADHEADER: + print_call_start_page( dc_attr ); + } + + if (dc_attr->emf) + { + int ret = EMFDC_ExtEscape( dc_attr, escape, input_size, input, output_size, output ); + if (ret) return ret; + } } return NtGdiExtEscape( hdc, NULL, 0, escape, input_size, input, output_size, output ); }