summaryrefslogtreecommitdiff
path: root/src/xpapputil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xpapputil.c')
-rw-r--r--src/xpapputil.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/xpapputil.c b/src/xpapputil.c
index 7e86f8e..afb81e4 100644
--- a/src/xpapputil.c
+++ b/src/xpapputil.c
@@ -131,15 +131,13 @@ XpAuErrorValue XpauParseArg( const char *arg_name, const char *arg_value, XpauCo
return XpAuError_success;
}
else if( !strcasecmp(arg_name, "resolution") )
- {
- int arg_res = atoi(arg_value);
-
+ {
if( !(context->resolution_list && (context->supported_doc_attributes & XPUATTRIBUTESUPPORTED_DEFAULT_PRINTER_RESOLUTION)) )
return XpAuError_unsupported_resolution;
- docvalues->resolution = XpuFindResolution(context->resolution_list,
+ docvalues->resolution = XpuFindResolutionByName(context->resolution_list,
context->resolution_num_list_entries,
- arg_res, arg_res);
+ arg_value);
if( !docvalues->resolution )
return XpAuError_unsupported_resolution;
@@ -409,7 +407,7 @@ XpAuErrorValue XpauStartJob( XpauContext *context, const char *printerfile )
}
/* Get default printer resolution */
- if( XpuGetResolution(context->pdpy, context->pcontext, &context->document_dpi) != 1 )
+ if( XpuGetResolution(context->pdpy, context->pcontext, &context->document_dpi_x, &context->document_dpi_y) != 1 )
{
result = XpAuError_no_dpi_set;
}
@@ -440,10 +438,11 @@ XpAuErrorValue XpauEndJob( XpauContext *context )
*/
XFlush(context->pdpy);
- context->inJob = False;
- context->pscreen = NULL;
- context->pscreennumber = -1;
- context->document_dpi = 0L;
+ context->inJob = False;
+ context->pscreen = NULL;
+ context->pscreennumber = -1;
+ context->document_dpi_x = 0L;
+ context->document_dpi_y = 0L;
if( context->print_to_filehandle )
{