screenlocker focus questions

Martin Gräßlin mgraesslin at kde.org
Tue Jan 6 17:51:52 UTC 2015


On Tuesday 06 January 2015 13:45:39 Sebastian Kügler wrote:
> Hey,
> 
> So I'm attempting to fix the focus of the screenlocker. When the
> screenlocker is started, the focus should be on the password input, so you
> can directly type after the machine woke up. This worked previously (I had
> already fixed it twice), but broke again recently.
> 
> I've tried a few things involving forceActiveFocus(), but they all don't
> seem to work anymore. I can get the locker to work if I click on it, or if
> I hit tab, in the latter case, the focus moves to the userlist, and when
> selecting a different user, it moves to the password field.
> 
> I want to move it to the password field initially, but for example calling
> forceActiveFocus() in the password's onCompleted: handler doesn't do that.
> 
> I've looked at the git log, and there weren't any changes in those QML
> files, so I assume the problem lies elsewhere. Maybe the window isn't
> getting focus correctly? I know a few things changed around it, so maybe
> someone (Martin?) has an idea where to look?

yes, it's not unlikely that the interaction broke and I didn't notice (for me 
focus had been broken a long time on my multi-screen setup and I implemented 
the changes on the multi-screen setup).

In the old setup the window got focus after being mapped. Now that's no longer 
the case. The window gets mapped once the WID has been passed to ksld - which 
according to my testing seems to happen after the window gets mapped. Might be 
that Qt is "confused" when it gets the additional focus request.

> 
> I'm also working blind here, since I couldn't find out how to get at the
> console output of the screenlocker, any ideas?

Which part of the screenlocker? Greeter is really difficult to get at, but 
should end up in xsession-errors. If you want to test the interaction try the 
test application in the build directory.

Cheers
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20150106/be3c0c30/attachment-0001.sig>


More information about the Plasma-devel mailing list