mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-29 08:00:21 +01:00
shell.lua: Add a helper to re-create background
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
parent
5a48cedc7b
commit
56b768d934
1 changed files with 16 additions and 6 deletions
|
|
@ -2,6 +2,7 @@ background_layer = {}
|
|||
normal_layer = {}
|
||||
hidden_layer = {}
|
||||
fullscreen_layer = {}
|
||||
background_curtain = nil
|
||||
current_width = 0
|
||||
current_height = 0
|
||||
|
||||
|
|
@ -59,15 +60,14 @@ function relayout()
|
|||
end
|
||||
end
|
||||
|
||||
function my_output_create(output)
|
||||
local pd = { has_fullscreen_view = false }
|
||||
function recreate_background(output)
|
||||
local x, y = output:get_position()
|
||||
local w, h = output:get_dimensions()
|
||||
|
||||
if (primary_output == nil) then
|
||||
primary_output = output
|
||||
if (background_curtain ~= nil) then
|
||||
background_curtain:dispose()
|
||||
end
|
||||
|
||||
x, y = output:get_position()
|
||||
w, h = output:get_dimensions()
|
||||
background_curtain = weston:create_curtain("output curtain")
|
||||
background_curtain:set_color(0xFF000000)
|
||||
background_curtain:set_position(x, y)
|
||||
|
|
@ -76,6 +76,16 @@ function my_output_create(output)
|
|||
bv = background_curtain:get_view()
|
||||
bv:set_output(output)
|
||||
bv:set_layer(background_layer)
|
||||
end
|
||||
|
||||
function my_output_create(output)
|
||||
local pd = { has_fullscreen_view = false }
|
||||
|
||||
if (primary_output == nil) then
|
||||
primary_output = output
|
||||
end
|
||||
|
||||
recreate_background(output)
|
||||
|
||||
pd.background_view = bv
|
||||
output:set_private(pd)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue