This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[kwin-wayland] Delay before automatically change focus

1

Votes
1
0
Tags: None
(comma "," separated)
Lachu
Registered Member
Posts
864
Karma
1
OS
Firstly, sorry for my bad English.

My idea is simple, but I don't know is there way to implement it with kwin-x11.

Currently, when new window appears, based on some settings, kwin will give keyboard focus to it.
My idea is about add new setting: time delay to automatically change focus. This setting will prevent to unfortunately interaction with new window. It will change behavior of kwin to disable mouse for time given by this settings and change keyboard focus only after period of time given by this setting. To give focus on newly created window before this time gone, user must click on newly created window, so this window will have keyboard and mouse focus, but mouse click didn't generate click event (it only give focus to window, so second click would be click).


Lachu, proud to be a member of KDE forums since 2008-Nov.
airdrik
Registered Member
Posts
1854
Karma
5
OS
The trouble with doing that is that the change in focus will be even more surprising than it is now. Now the focus changes at the same time as the new window appearing. With this setting the focus will change after some amount of time (and time is a hard thing for people to accurately measure).

An idea to make this smarter is for the delay to be some kind of timeout after keyboard activity stops. In other words if you set the delay to 3 seconds then that means that the focus will switch only if there has been 3 seconds without keyboard activity (and there should be some kind of cue to indicate to the user that the focus has switched). This should hopefully resolve the problem where the user is in the middle of typing (their password or some other sensitive information) into window A when window B pops up steals focus and starts capturing their (sensitive) input. Instead the focus only switches after the user stops typing long enough to realize that there is a new window which is ready for their input.

Another idea I've noticed in Firefox's file download dialog is that the dialog will disable the Save button when the dialog loses focus and only enable it after somewhere around 1-2 seconds of having focus. It's a little obnoxious when you are used to being able to click on the button without needing to bring the dialog into full focus (or if your mouse skills are sloppy and the cursor slips and triggers focus on the main window on the way to the button), but I'd assume they did it to reduce accidental clicks.
Applying that to KDE, I could see disabling the buttons on a new dialog for the first 1-2 seconds after it first appears to give you enough time to realize what you are about to accept (and avoiding accidentally accepting it because you hit enter for something on whatever window already had focus just after the new dialog appeared). Of course it should be configurable as I know there are plenty of users who expect and anticipate dialogs and want to be able to dismiss (accept) them as soon as they show up.


airdrik, proud to be a member of KDE forums since 2008-Dec.
Lachu
Registered Member
Posts
864
Karma
1
OS
airdrik wrote:The trouble with doing that is that the change in focus will be even more surprising than it is now. Now the focus changes at the same time as the new window appearing. With this setting the focus will change after some amount of time (and time is a hard thing for people to accurately measure).


Yes, but KWin can do animation, like colorize widow borders during change focus.


Lachu, proud to be a member of KDE forums since 2008-Nov.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]