Code review comment for lp:~mzanetti/unity8/fix-focus-on-app-launch

Revision history for this message
Michael Zanetti (mzanetti) wrote :

On 04.04.2017 18:42, Daniel d'Andrada wrote:
> On 04/04/2017 13:37, Michael Zanetti wrote:
>>> """
>>> root.focus = false;
>>> """
>>>
>>> This looks redundant. I think code should be caring about whom to give focus
>>> to, not in explicitly unfocusing the item that's losing it as this is the
>>> side-effect of focusing someone else anyway. Is that really needed?
>> yes... I just moved it a bit from where it was before... currently the launcher works in a way that when it is closed it unfocuses itself and in shell we have:
>>
>> Launcher { onFocusChanged: if (!focus) stage.focus = true }
>>
>> so that's kinda ok for here... I do certainly agree that in general this needs to be consolidated in a way eventually.
>
> Maybe something like this would be a step in the right direction:
>
> Launcher { onClosed: stage.focus = true }
>
>

It doesn't necessarily only happen when closed... e.g. with alt+F1 you
focus it for keyboard navigation... when then you press esc the launcher
unfocuses itself and focus should go back to the stage even if the
launcher might not close because the setting says it should stay opened.

« Back to merge proposal