[PATCH] plymouth/script: Fix window size with multiple heads

Charlie Brej plymouth at brej.org
Thu Apr 18 01:08:11 PDT 2013


Hi,
The use of the smallest screen size is deliberate. If we have multiple
screens then the smallest screen is the x=0,y=0 and the default size is
it's size. That way, by default, if we place something at the bottom/top of
the screen, it will be visible in all screens. This is because sometimes we
have screens that are not switched on (large external laptop monitors etc).

Note the larger screens have the top left corner at negative x,y. So you
would have to find its position to place the large image.

If you would like an image to span the greatest width/height, run through
the screen sizes and get the max. Either that or make a new getMaxWidth
function.

Charlie


On Tue, Apr 16, 2013 at 1:49 PM, Ray Strode <halfline at gmail.com> wrote:

> Charlie, what do you think about this patch?
>
>
> On Mon, Apr 15, 2013 at 12:29 AM, Cristian Rodríguez <
> crrodriguez at opensuse.org> wrote:
>
>> From: Jeff Mahoney <jeffm at suse.com>
>>
>>  Plymouth "zooms" in on smaller displays when multiple displays are used,
>>  but the script splash plugin defines the window size as the smallest
>>  of the displays. When using a sprite as a background image, the wrong
>>  size is used which leaves large chunks of the screen unused.
>>
>>  This patch uses the largest display as the window size, which allows
>>  it to be appopriately cropped on smaller displays.
>>
>> Signed-off-by: Jeff Mahoney <jeffm at suse.com>
>> Signed-off-by: Cristian Rodríguez <crrodriguez at opensuse.org>
>> ---
>>  src/plugins/splash/script/script-lib-sprite.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/plugins/splash/script/script-lib-sprite.c
>> b/src/plugins/splash/script/script-lib-sprite.c
>> index e0ced7e..c865cbb 100644
>> --- a/src/plugins/splash/script/script-lib-sprite.c
>> +++ b/src/plugins/splash/script/script-lib-sprite.c
>> @@ -233,7 +233,7 @@ static script_return_t sprite_window_get_width
>> (script_state_t *state,
>>        if (width == 0)
>>          width = ply_pixel_display_get_width (display->pixel_display);
>>        else
>> -        width = MIN (width, ply_pixel_display_get_width
>> (display->pixel_display));
>> +        width = MAX (width, ply_pixel_display_get_width
>> (display->pixel_display));
>>      }
>>    return script_return_obj (script_obj_new_number (width));
>>  }
>> @@ -273,7 +273,7 @@ static script_return_t sprite_window_get_height
>> (script_state_t *state,
>>        if (height == 0)
>>          height = ply_pixel_display_get_height (display->pixel_display);
>>        else
>> -        height = MIN (height, ply_pixel_display_get_height
>> (display->pixel_display));
>> +        height = MAX (height, ply_pixel_display_get_height
>> (display->pixel_display));
>>      }
>>    return script_return_obj (script_obj_new_number (height));
>>  }
>> --
>> 1.8.1.4
>>
>> _______________________________________________
>> plymouth mailing list
>> plymouth at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/plymouth
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/plymouth/attachments/20130418/c75185bf/attachment.html>


More information about the plymouth mailing list