
KWin Delay Focus
Source (link to git-repo or to original if based on someone elses unmodified work):
When KWin is set for "Focus Follows/Under Mouse" you can now also set a delay between the time when the mouse enters the window and when the window actually gets focus.
I wrote this patch because, previously, having the current application's menu bar at the top of the screen is mostly unusable. If you wanted to access the menu bar, but your mouse went over another window on the way to the top of the screen, the focus would change causing the menubar the change. Setting a delay for the focus lets the cursor make it quickly across other windows without losing focus of the window whose menu you are trying to access.
This patch is written and tested under KDE CVS ~2004-05-09. I quickly ported a patch to apply against KDE 3.2.2, but I have not tested that version.
You will need to patch and rebuild KWin to use this, KWin is part of kdebase.
Per KDE Developer Lubos Lunak's suggestions, I have moved most of the delay focus functions from Client to Workspace and have added an additional cancelDelayFocus() call at Workspace::takeActivity(). The second change prevents the following scenario: mouse enters window, Alt+F2 pops up run prompt, then window with mouse over if becomes active.
This patch has been committed into KDE CVS as of two days ago.
Ratings & Comments
6 Comments
thanks, you are improving kde code I have a question: I always used "click to focus" Can somebody spend 5 minutes to explain me (and other people surely) what is the differnece between "focus follows mouse" "focus under mouse" "focus strictly under mouse" options ? thanks
pffff... I recall reading about this, somewhere - maybe you can find out on the KDE fora, or on the dot(.kde.org). or google?
Click on the question mark in the title bar, then on the focus policy box/label, you'll get a full description.
very good job !
Great ! Now "focus on hover" in usable !!! Do you will intergate it to KDE 3.3 ? I hope...
Already in KDE CVS.