Bug 33701 - focus not retained when switching desktop
Summary: focus not retained when switching desktop
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 117223 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-10-15 07:18 UTC by Oswald Buddenhagen
Modified: 2006-04-28 01:25 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description C F 2001-10-15 07:13:30 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kwin
Version:           unknown (using KDE 2.2.1 )
Severity:          normal
Installed from:    compiled sources
Compiler:          gcc version 2.95.3 20010315 (release)
OS:                Linux (i686) release 2.2.13
OS/Compiler notes: 

This happens only when there is a window which is shown on "All desktops".

Simple example:
Open two konsoles A and B. Set B to show on all desktops. Set the focus to A.
Switch the desktop and change focus to B. Now when you come back to the original desktop B still retains in focus.

You might argue that this is a feature but it becomes obtrusive. Consider that B may have importance (with some compiling going) on one desktop while not so on another desktop (where I may be browsing).


(Submitted via bugs.kde.org)
(Called from KBugReport dialog)
Comment 1 Cristian Tibirna 2002-03-10 21:28:15 UTC
Sorry we can't implement focus follows mind yet. The hardware isn't yet 
advanced enough.

-- 
Cristian Tibirna .. tibirna@sympatico.ca
PhD Student .. ctibirna@giref.ulaval.ca .. www.giref.ulaval.ca/~ctibirna
KDE contact - Canada .. tibirna@kde.org .. www.kde.org
Comment 2 Lubos Lunak 2003-05-07 20:21:31 UTC
I see reasons for and against. Laziness wins (and also the fact that you can make it work as 
you want by making B not to accept focus - kstart --skiptaskbar, perhaps also something 
better for 3.2). 
 
 
Comment 3 Oswald Buddenhagen 2003-11-19 00:38:46 UTC
i have the cheek to simply reopen the report, as the current behaviour is getting on my nerves.
there could be three modes of operation, i think:
- the current one
- a fully decoupled one, i.e., every desktop has independent focus. maybe it would make sense to have a "focus affine" window flag, which overrides the independency - i'm not convinced of the idea, though.
- a middle course: a "weak focus" bit is set when a window gets focus "by accident" (due to a desktop switch). when this bit is set, the focus will be given back on desktop switch. the "weak bit" is cleared when the "weakly focused" window sees user input, i.e., buttondown or (non-modifier) keypress.

as for christian's comment ... not sure how it was 1.5 years ago, but today eye-tracking systems (as a possible solution) actually exist ... the equipment is just somewhat expensive, i think. :}
Comment 4 Stephan Kulow 2004-05-20 21:17:32 UTC
Replaced code_fount@yahoo.com with ossi@kde.org due to bounces by reporter
Comment 5 Lubos Lunak 2006-02-23 23:31:31 UTC
*** Bug 117223 has been marked as a duplicate of this bug. ***
Comment 6 Lubos Lunak 2006-02-27 10:55:21 UTC
SVN commit 514048 by lunakl:

Use a separate focus chain for each virtual desktop - this prevents onalldesktop
windows from usually getting focus after every virtual desktop switch.
Thanks for most of the work go to Guido Fiala <gfiala@s.netic.de>.
BUG: 33701



 M  +4 -11     activation.cpp  
 M  +5 -0      client.cpp  
 M  +2 -3      events.cpp  
 M  +17 -12    layers.cpp  
 M  +14 -12    tabbox.cpp  
 M  +63 -28    workspace.cpp  
 M  +3 -1      workspace.h  
Comment 7 MZ 2006-04-28 01:25:17 UTC
Can there be an option added to retain the old behavior? I often used it to quickly send a program to another desktop using only the keyboard. (I have "make window all desktops" bound to alt-space.) Maybe something like, "All desktops windows retain focus on desktop switch."