Bug 286444 - Alt-Tab don't show any windows, when all of them are minimized
Summary: Alt-Tab don't show any windows, when all of them are minimized
Status: RESOLVED DUPLICATE of bug 305449
Alias: None
Product: kwin
Classification: Plasma
Component: tabbox (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-12 20:19 UTC by Ivan Sorokin
Modified: 2012-08-23 06:50 UTC (History)
0 users

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 Ivan Sorokin 2011-11-12 20:19:43 UTC
Version:           4.7 (using KDE 4.7.2) 
OS:                Linux

I'm running KDE4 without plasma-desktop. (/usr/share/autostart/plasma-desktop.desktop Hidden=true)

When I minimize all my windows, Alt-Tab dialog says that there is no any windows. This didn't happened when I minimize all except one of them.

Reproducible: Always

Steps to Reproduce:
1. Kill plasma-desktop.
2. Try to Alt-Tab. Everything is ok.
3. Minimize all windows.
4. Try to Alt-Tab again.

Actual Results:  
Dialog says that there is no any windows.

Expected Results:  
I see all my windows and I can switch to them.
Comment 1 Martin Flöser 2011-11-13 08:37:39 UTC
I just tried and cannot reproduce on master. I have a few questions:
* do you use desktop effects?
* what are your settings in the Task Switcher control module?
Comment 2 Ivan Sorokin 2011-11-13 09:35:17 UTC
I've digged into a code and I've found out that this bug only appears when "System Settings->Window Behavior->Task Switcher->Sort Order" is set to "Recently used". When it is "Stacking order" everything is ok.

May be there is something with ClientModel::createClientList function?

> * do you use desktop effects?

In "System Settings->Desktop Effects->General" all checkboxes are off.

> * what are your settings in the Task Switcher control module?

List windows: Current desktop
Sort order: Recently used (with "Stacking order" everything is ok)
Include desktop: off
Highlight selected window: off (it doesn't affect)
Show outline of selected window: off (it doesn't affect)
Effect: No Effect
Display list while switch: on
Comment 3 Martin Flöser 2011-11-13 09:42:14 UTC
still I cannot reproduce when turning compositing off and using recently used
Comment 4 Thomas Lübking 2011-11-13 10:07:48 UTC
can, 4.7 or git master
i think one has to try twice (could reproduce immediately on first attempt, but needed to either alt-tab or manimpulate settings or whatever on second)

It's not a visual issue, the list is empty (ie. it's not possible to switch windows)

on a wild guess, i'd assume that "TabBoxClient* c = tabBox->nextClientFocusChain(start);" is NULL because there's currently no next client in the chain (they're all minimized)
Comment 5 Thomas Lübking 2011-11-13 13:13:46 UTC
yes, is. but picking
if (!c) // happens when all windows are minimized
            c = tabBox->stackingOrder().first();
leads to an infinite loop ... :-\
Comment 6 Thomas Lübking 2011-11-13 14:00:58 UTC
@Martin

Okey, the problem is that start is NULL and  TabBoxHandlerImpl::nextClientFocusChain() has a typecast check, bypassing the actual Workspace::self()->tabBox()->nextClientFocusChain(c->client()); call

Since tabbox has (yet?) no access to Workspace::mostRecentlyActivatedClient() there's no easy catch in ClientModel::createClientList() but i wonder why the cast check is there in the first place since nextClientFocusChain() will return ".last()" if one passes a non existing client.
Comment 7 Martin Flöser 2011-11-13 15:19:58 UTC
I'll have a look at it - need to do it anyway as since the introduction of the 
QML TabBox I stumble upon dangling pointers from time to time (though no 
reliable way to reproduce)
Comment 8 Martin Flöser 2012-08-23 06:50:24 UTC
sorry for the long delay. I set this bug to duplicate of the newer bug which has a patch on review board. Maybe you want to give it a try :-)

*** This bug has been marked as a duplicate of bug 305449 ***