Bug 262540 - JJ: [Present Windows] doesn‘t disappear when closing last window
Summary: JJ: [Present Windows] doesn‘t disappear when closing last window
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2011-01-08 17:11 UTC by Kai Uwe Broulik
Modified: 2011-03-06 19:25 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.7.0


Attachments
Make Present disappear when closing last window (576 bytes, patch)
2011-02-10 22:29 UTC, Marcus Hähnel
Details
Make Present disappear when closing last window (708 bytes, patch)
2011-02-11 07:23 UTC, Marcus Hähnel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Uwe Broulik 2011-01-08 17:11:24 UTC
Version:           unspecified (using KDE 4.5.95) 
OS:                Linux

In KDE 4.6 you can close windows directly from the Present Window Grid. When closing the last window, the Grid effect doesn‘t disapper. You need to click somewhere or press Escape to return to normal desktop.

Reproducible: Couldn't Reproduce
Comment 1 Martin Flöser 2011-01-13 19:27:15 UTC
Btw thanks for all the reported bugs.
Comment 2 Kai Uwe Broulik 2011-01-13 19:34:56 UTC
No problem :) I just want to prove that KDE can be as elegant and shiny as Mac OS X :P
Comment 3 Marcus Hähnel 2011-02-10 22:29:22 UTC
Created attachment 57130 [details]
Make Present disappear when closing last window

Since this is a junior job and I wanted to start helping with KDE Development I thought I might as well start here.

Turned out it was easier than I thought. The patch (against git-master) is attached and always deactivates the presentWindows as soon as no more windows are there to be highlighted. This might also fix a TODO in line 849. 

I didn't remove the comment, but the maintainer or whoever is responsible may feel free to remove it.

I also added the maintainer / author of the plugin to CC
Comment 4 Martin Flöser 2011-02-10 22:40:24 UTC
On Thursday 10 February 2011 22:29:24 Marcus Hähnel wrote:
>  Created an attachment (id=57130)
>  --> (http://bugs.kde.org/attachment.cgi?id=57130)
> Make Present disappear when closing last window
thanks for the patch, but I doubt that it will work. w will also be null when 
filtering and not matching anything.

You might want to open a review request on git.reviewboard.kde.org - it's more 
suited to patch review and I get here something like 20 to 30 bug mails per 
day, so it's easily missed ;-)
Comment 5 Marcus Hähnel 2011-02-11 07:23:05 UTC
Created attachment 57149 [details]
 Make Present disappear when closing last window

Ok. You're right. I totaly forgot about the filter. I posted an updated patch to the reviewboard (thanks for the hint) that only closes the view if there are no more managedWindows. 

This does not look as elegant as the first patch, but it actually works ;)
I just attach the patch here for completeness sake.
Comment 6 Martin Flöser 2011-03-06 19:10:19 UTC
Git commit 72a41e5df7addf1ba00567473b7376222bd0ded4 by Martin Gr����lin.
Committed on 06/03/2011 at 19:08.
Pushed by graesslin into branch 'master'.

End PresentWindows effect after last window closed

Thanks to Marus H��hnel for this contribution to KDE.
CCMAIL: marcus@mh-development.info
FEATURE: 262540
FIXED-IN: 4.7.0
REVIEW: 100627

M  +7    -0    kwin/effects/presentwindows/presentwindows.cpp     

http://commits.kde.org/kde-workspace/72a41e5df7addf1ba00567473b7376222bd0ded4
Comment 7 Kai Uwe Broulik 2011-03-06 19:18:37 UTC
This doesn‘t count as bug fixing? So not in 4.6.2 :(
Comment 8 Martin Flöser 2011-03-06 19:25:11 UTC
> This doesn‘t count as bug fixing?
No, that's clearly a feature and I was surprised that this bug was not opened 
as a wishlist ;-)
> So not in 4.6.2 :(
Sorry, it could introduce new bugs, therefore a no-go for stable release