I have some applications with 1 window and 1 application with more than 1 window. I have set sort order to "recently used" and use "one window per application". After switching to multiwindow application alt+tab shows first not recently used window, but starts from the previous position, before i switched to multiwindow application. Reproducible: Always
I confirm this in KDE 4.9.0, OpenSuse packages.
I have problems understanding this bug report. Could you please provide detailed steps how to reproduce the issue as requested in the bug creation wizard? 1. do foo 2. do bar 3. do baz Expected result: foobar is shown Actual result: barbaz is shown Please elaborate also the example, don't be that abstract like 1 window and 1 application. That makes it difficult to follow what is the problem.
Enable "One Window per application" Open at least two kwrite windows and two other windows Focus a non kwrite window then one of the kwrite windows then the next. Start alt+tab. The window you focused before the first kwrite window does not get the focus but some other. The claim is it would be the third last window, but it seems rather "random" to me. The other write window should of course not be selected but the one before focusing the first kwrite window
Note this only happens when there actually are several windows of one application and when you alt-tab from one of these windows. As Thomas said, then it is expected the first window of the task list should be focused. Instead, it is the next in the list (after the previous position of the window that was previously focused) which is focused. Say I have 2 instances of kwrite, and kwrite is 4th in the task list, if I alt-tab to kwrite, next time I alt-tab, it's the fifth application of the list that receives the focus.
ok, I can reproduce this issue and I think I understand it. I'll try to find a way to unit test it, but it's quite warm this evening in my office :-)
patch added to review board. I would appreciate some testing as it was impossible to write a unit test :-) My own testing seemed to show it working.
Git commit 567f8cc50082ce5307aa7163fdf3176446a1df5a by Martin Gräßlin. Committed on 23/08/2012 at 08:39. Pushed by graesslin into branch 'KDE/4.9'. Start building up of ClientModel with the first Client to include So far the first Client to be shown in the list (that is the currently active window) was inserted as the last client into the list by prepending it to the list. This meant that if another Client actually blocks the inclusion of the currently selected Client (e.g. only one window per app) the currently active Client never got included in this list. This change ensures that the recently used model switching has the starting Client as the first Client in the list and also simplifies the code. Stacking order switching mode is not adjusted as it seems rather broken, like the comment already says. FIXED-IN: 4.9.1 REVIEW: 106139 M +4 -11 kwin/tabbox/clientmodel.cpp M +3 -0 kwin/tabbox/tabbox.cpp http://commits.kde.org/kde-workspace/567f8cc50082ce5307aa7163fdf3176446a1df5a