Commit 9d417942 authored by Simon Steinbeiss's avatar Simon Steinbeiss

display: Resize display widget according to scale

This may not be all the places the scale has to be taken into account.
parent 87d6266d
Pipeline #831 passed with stages
in 3 minutes and 20 seconds
......@@ -102,6 +102,8 @@ struct _XfceOutputInfo
guint pref_width;
guint pref_height;
Rotation rotation;
gdouble scalex;
gdouble scaley;
/* Frequency */
gdouble rate;
......
......@@ -2649,6 +2649,8 @@ convert_xfce_output_info (gint output_id)
output->id = output_id;
output->x = x;
output->y = y;
output->scalex = xfce_randr->scalex[output_id];
output->scaley = xfce_randr->scaley[output_id];
output->user_data = NULL;
output->display_name = xfce_randr->friendly_name[output_id];
output->connected = TRUE;
......@@ -2775,8 +2777,17 @@ get_geometry (XfceOutputInfo *output, int *w, int *h)
{
if (output->on)
{
*h = output->height;
*w = output->width;
if (output->scalex > 0 && output->scalex != 1.0
&& output->scaley > 0 && output->scaley != 1.0)
{
*h = output->height * output->scaley;
*w = output->width * output->scalex;
}
else
{
*h = output->height;
*w = output->width;
}
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment