[PATCH] dim-layer: fix dimming for unfocused surfaces
Ander Conselvan de Oliveira
conselvan2 at gmail.com
Wed Jan 29 07:09:50 PST 2014
On 01/15/2014 10:30 AM, Emilio Pozuelo Monfort wrote:
> bump
>
> On 07/01/14 17:23, pochu27 at gmail.com wrote:
>> From: Emilio Pozuelo Monfort <emilio.pozuelo at collabora.co.uk>
>>
>> Unfocusing a surface should dim it when dim-layer is enabled,
>> but this got broken in commit 83ffd9.
>> ---
>> desktop-shell/shell.c | 13 ++++++++++++-
>> 1 file changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
>> index f85a269..cca96be 100644
>> --- a/desktop-shell/shell.c
>> +++ b/desktop-shell/shell.c
>> @@ -4141,6 +4141,7 @@ activate(struct desktop_shell *shell, struct weston_surface *es,
>> struct weston_seat *seat)
>> {
>> struct weston_surface *main_surface;
>> + struct weston_view *main_view;
>> struct focus_state *state;
>> struct workspace *ws;
>> struct weston_surface *old_es;
>> @@ -4162,8 +4163,18 @@ activate(struct desktop_shell *shell, struct weston_surface *es,
>> shsurf = get_shell_surface(main_surface);
>> if (shsurf->state.fullscreen)
>> shell_configure_fullscreen(shsurf);
>> - else
>> + else {
>> + ws = get_current_workspace(shell);
>> + main_view = get_default_view(main_surface);
>> + if (main_view) {
>> + wl_list_remove(&main_view->layer_link);
>> + wl_list_insert(&ws->layer.view_list, &main_view->layer_link);
>> + weston_view_damage_below(main_view);
>> + weston_surface_damage(main_view->surface);
>> + }
So you're basically rewriting weston_view_restack() here. Wouldn't a
better fix be to move the animation logic below the call to
shell_surface_update_layer(), which is the place where the surface is
restacked after the commit you mentioned.
Cheers,
Ander
>> +
>> restore_all_output_modes(shell->compositor);
>> + }
>>
>> if (shell->focus_animation_type != ANIMATION_NONE) {
>> ws = get_current_workspace(shell);
>>
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
More information about the wayland-devel
mailing list