Bug 299655 - After using kwin "Show Desktop" functionality invoking Alt+F2 causes not only KRunner to pop up but all windows as well.
Summary: After using kwin "Show Desktop" functionality invoking Alt+F2 causes not only...
Status: RESOLVED DUPLICATE of bug 67406
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: 4.8.3
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 232374 300973 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-05-08 21:24 UTC by Georgiy Treyvus
Modified: 2013-11-06 22:37 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
minimizes all windows on current desktop (433 bytes, text/plain)
2012-06-19 18:49 UTC, Thomas Lübking
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Georgiy Treyvus 2012-05-08 21:24:25 UTC
I rig kwin to do "Show Desktop" with Super+D(not that the keybinding itself should effect anything). I use it to minimize all windows on my desktop. Then I go Alt-F2 to enter whatever command but not only does the krunner run command thing pop up at the top but every minimized window is unminimzed.

Reproducible: Always

Steps to Reproduce:
1. Have kwin's "Show Desktop" command rigged to whatever keybinding you find convenient.
2. Use that keybinding to minimize open windows on the desktop.
3. Use Alt-F2 to bring out krunner and watch all minimized windows pop up as well.
Actual Results:  
already mentioned before

Expected Results:  
krunner popping up and the minimized windows staying mninimized
Comment 1 Georgiy Treyvus 2012-05-08 21:27:20 UTC
This effects KDE SC 4.7 and 4.8. This has happened on all of Debian Testing(Wheezy), Debian Unstable, and Fedora 16.
Comment 2 Anne-Marie Mahfouf 2012-05-09 08:37:37 UTC
I also find this very annoying. I use the "Show Desktop" applet in my panel and then calling KRunner with Alt+F2 brings back all windows.
Comment 3 Thomas Lübking 2012-05-11 00:11:52 UTC
This is bug #67406
Also see bug #113552 for why krunner or yakuake trigger this bug eg. kickoff (likely, didn't try) not
And if you're not yet tired also bug #228908

Long story short: it's called "show desktop" - if there's a window, the desktop is obviously no longer shown, the state is broken so the former setup restored.

This was weakened for windows "belonging to the desktop" and also an option "ShowDesktopIsMinimizeAll" had been introduced bug is likely just a dead key for bug #99524 commit
Comment 4 Thomas Lübking 2012-05-11 16:58:17 UTC
Correction: the option is NOT dead, so if you fire

kwriteconfig --file kwinrc --group Windows --key ShowDesktopIsMinimizeAll true
qdbus org.kde.kwin /KWin reconfigure

Showing up windows will NOT unminimize windows hidden by the show desktop trigger BUT the desktop showing state is still reset (ie. you can also not unhide formerly hidden windows by the showDesktop shortcut or any other invocation)

A solution from krunner might be to KWindowSystem::setMainWindow(QWidget *subwindow, WId mainwindow) for the WId of the desktop window.
Comment 5 Jekyll Wu 2012-06-01 02:13:53 UTC
*** Bug 300973 has been marked as a duplicate of this bug. ***
Comment 6 Jekyll Wu 2012-06-01 02:29:26 UTC
*** Bug 232374 has been marked as a duplicate of this bug. ***
Comment 7 Luke 2012-06-16 14:25:57 UTC
Yep, same thing in 4.9 beta2.
Comment 8 Martin Bříza 2012-06-19 08:22:26 UTC
This bug is also reported in the Red Hat Bugzilla for Fedora 17 and KDE SC release 4.8.3 on https://bugzilla.redhat.com/show_bug.cgi?id=827244
Comment 9 Martin Flöser 2012-06-19 16:37:02 UTC
The behavior looks absolutely correct to me. Show Desktop is a modal mode which either has all windows hidden or none. By opening a window (as Alt+F2 does) the mode is ended. That behavior is as this expected and correct.

For users who don't like this behavior there is an option as pointed out in comment #4.

if it is just about showing the desktop, I would recommend to use the Dashboard (ctrl+f12) which is better suited.
Comment 10 Thomas Lübking 2012-06-19 16:59:01 UTC
FTR:
The "bug" is on krunner (i just didn't un-CC kwin)
IIRC in KDE3 times the alt+f2 runner was transient for the desktop as hinted in comments #3 & #4, so it could be mapped w/o affecting the ShowDesktop state.

This *can* still be achieved by each and every client - *iff* it thinks that makes sense, what i don't intent to comment on in the particular case.
Comment 11 Luke 2012-06-19 17:23:56 UTC
(In reply to comment #9)
> The behavior looks absolutely correct to me. Show Desktop is a modal mode
> which either has all windows hidden or none. By opening a window (as Alt+F2
> does) the mode is ended. That behavior is as this expected and correct.
> 
> For users who don't like this behavior there is an option as pointed out in
> comment #4.
> 
> if it is just about showing the desktop, I would recommend to use the
> Dashboard (ctrl+f12) which is better suited.

Made screencast - this explain everything i.e. it's _not_ correct way and bug shuld be re-opened

http://bayfiles.com/file/dQDh/GuZBTO/ffcast-20120619-190940.mkv

PS Sorry for my English ;) I've made probably about 10 grammar mistakes
Comment 12 Reartes Guillermo 2012-06-19 17:35:36 UTC
In F17 (KDE 4.8.3 using Folderview), executing:

$ kwriteconfig --file kwinrc --group Windows --key ShowDesktopIsMinimizeAll true
$ qdbus org.kde.kwin /KWin reconfigure

Sets "Show Desktop" as i expected it to be in the first space.
I am glad to see that the corresponding config option exists, although it 
is somewhat pseudo-hidden.

Having several windows opened, i press show desktop, 
then ALT+F2 and only krunner is show.
Comment 13 Thomas Lübking 2012-06-19 17:47:32 UTC
(this bug gets flooded with misinformation)

That is /not/ the expected behavior.
Try to "unshow" the desktop now -> fails.

"Show Desktop" means "Show Desktop" - if you show any other window, you're obviously no longer interested on showing the desktop why this is reverted.

There's been made reasonable exceptions for windows that do belong to the desktop and since you only seem to care about krunner, I assume that this is actually what you want krunner to hint (and that is why i moved the bug from kwin to krunner)

The hidden feature actually breaks "show desktop" and implements some sort of "minimize all windows".
Comment 14 Reartes Guillermo 2012-06-19 18:13:29 UTC
> "Show Desktop" means "Show Desktop" - if you show any other window, you're obviously
> no longer interested on showing the desktop why this is reverted.

Wel, then a "Minimize All Windows" widget must be created and "Show Desktop" fixed.
Obviously, i not interested in seeing the desktop wallpaper, just minimizing all opened windows
in one shot (action) mapped to a single event.

> The hidden feature actually breaks "show desktop" and implements some 
> sort of "minimize all windows".

But the feature is disbled by default.
And yes, i am pleased it does implement the "minimize all windows" functionality.

Of course, this is from me, an user perspective, specifically i use more windows-like style
options, forlderview, etc. It is one the possible KDE setups. So in this case, a "minimize
all windows" is needed. The "show desktop" was the most discovereable/similar option a
user will choose. (even if it is wrong).

Maybe "show desktop" should implement a set of config options.
Comment 15 Thomas Lübking 2012-06-19 18:49:17 UTC
Created attachment 71954 [details]
minimizes all windows on current desktop

(In reply to comment #14)
> Well, then a "Minimize All Windows" widget must be created
-> forum brainstorm, plasma-desktop feature request, just write one
on this bug the request is pointless.

> and "Show Desktop" fixed.
it's not broken

> Obviously, i not interested in seeing the desktop wallpaper
the idea was likely rather providing access to desklets or icons.

> just minimizing all opened windows
> in one shot (action) mapped to a single event.
If you're not interested in access to the desktop, may i ask "why"
(ie.: are you actually looking for virtual desktops?)
 
> Maybe "show desktop" should implement a set of config options.
I'd frankly rather remove that option and provide a "minimize all windows" shortcut then confusing ppl. even more about what "show desktop" is and what it's not.
However, that would not work across window managers (thus reliably be used by a plasmoid) so i'd suggest to have it standlaone/a plasmoid. (it's trivial, see attachment)
Comment 16 Luke 2012-06-19 19:33:01 UTC
OK lets establish something - watch screencast and you'll see why people think it's broken - because it behaves differently if you open new window and when you invoke krunner. Also people expect Windows-like behavior (who in hell would want to just "SHOW desktop"?!).
Comment 17 Thomas Lübking 2012-06-19 20:11:00 UTC
(In reply to comment #16)
> OK lets establish something - watch screencast
Don't upload 2MB to a one-click hoster?
Everybody here knows what happens.

> because it behaves differently if you open new window and when you invoke krunner. 
Nope, depends on the invocation. (Therefore hits yakuake as well as eg. "sleep 10; dolphin")

Right now, i don't know what's "wrong" when clicking on the desktop to open a window - testing now, but that seems a bug (at least it is not suggested by the code path, there's likely a blocked state)

> Also people expect Windows-like behavior (who in hell would want to just "SHOW desktop"?!).
Apparently those who defined the NETWM spec.
Also, who would want to minimize all .. oh, i forgot:
you're probably not familiar with the concept of virtual desktops?
(I've never felt the requirement to minimize all windows for what? unclutter??)
Comment 18 Reartes Guillermo 2012-06-19 20:24:00 UTC
> Also, who would want to minimize all .. 
some people (icluding myself), but not all people. Just a subset of people.

> oh, i forgot: you're probably not familiar with the concept of virtual desktops?

I am, used them much more with compiz-fusion CTRL + ARROW, fast and easy. But i do
not use them in KDE.

Anyway, one thing (virtual desktop existence) does not exclude the other (abitity to minimize
all maximized windows on the current screen), otherwise it sounds very similar to a typical gnome recomendation (who want to minimize... let's get ride of the minimize buttons...). I do think that is not the path KDE should take.
Comment 19 Georgiy Treyvus 2012-06-19 20:47:09 UTC
Seriously why can't KDE have it's Show Desktop functionality behave the way people have come to expect in every other desktop environment? I didn't bugreport this because of nothing better to do.

Also KDE Devs I understand your explanation of why things currently behave the way they do and your workaround. However I still believe the Show Desktop behavior should be modified to behave similarly to how people from other desktops are used to.

If you are not willing to change this behavior the good news is that there is a workaround. The bad news is that while I am very comfortable on the command line not everyone else is. There should at the very least be an easily accesible GUI dialog to configure the Show Desktop behavior. Not only that but it's necessary to maintain KDE's consistency in terms of configurability and completeness of applications.

However when all's said and done the simplest solution is to make Show Desktop behave the way people from every other desktop environment are used to. Even if it can be easily configured that way from the default it's still a loss because it will potentially alienate a lot of new users. Don't be so snappy with the RESOLVED INVALID marking.
Comment 20 Martin Flöser 2012-06-19 20:47:23 UTC
> Anyway, one thing (virtual desktop existence) does not exclude the other
> (abitity to minimize
> all maximized windows on the current screen), otherwise it sounds very
> similar to a typical gnome recomendation (who want to minimize... let's get
> ride of the minimize buttons...). I do think that is not the path KDE
> should take.
and now we all calm down, get back on topic and don't bring in completely 
unrelated stuff from other environments. Any further comments on that will 
result in me taking care of nobody being able to comment on this report any 
more. Thanks.

So now to be constructive: with 4.9 you can have scripts inside KWin and you 
can even bind global shortcuts to scripts. So it's quite possible to write a 
script which minimizes all windows and do that when triggering a shortcut.

Triggering shortcuts can be bound to a D-Bus call which again can be called 
from Plasmoids who wants it.

So if anyone is interested in getting what he needs: 5 lines of JavaScript 
will be enough.
Comment 21 Martin Flöser 2012-06-19 20:52:32 UTC
Please do not reopen bugs set to invalid. The reported behavior is correct. If you disagree, please use brainstorm.forum.kde.org to discuss a possible new feature.

Please note that reopening bugs does not help your case: nobody is going to implement your desired feature just because you are able to yell load enough. Quite the opposite: it makes it even more unlikely that someone is going to invest time into it.
Comment 22 Georgiy Treyvus 2012-06-19 20:53:59 UTC
In very simple words what we need is to be able to Toggle Show Desktop. Every other desktop has this? Why can't KDE?
Comment 23 Martin Flöser 2012-06-19 21:00:45 UTC
(In reply to comment #22)
> In very simple words what we need is to be able to Toggle Show Desktop.
Yes, toggle show desktop, means "show desktop" in the one state and "don't show desktop" in the other one. That *is* exactly what you want. Please understand that the *correct* behavior implies that the "show desktop" mode is ended whenever a window is opened again, because otherwise it's not "show desktop" any more - there is a window shown.

If you want minimize all windows, just enable that option as already pointed out several times.
> Every other desktop has this? Why can't KDE?
First of all this is completely irrelevant who has something and who doesn't. Then this is not true. The behavior is in fact standardized in the EWMH, given that the spec has mostly been written by GNOME, I would assume that some GNOME versions support it. Let me quote the relevant section of the spec:

> Some Window Managers have a "showing the desktop" mode in which windows are hidden, and the desktop background is displayed and focused.
As you clearly see: when a window is shown or even focused the Window Manager cannot be in the "showing the desktop" mode.
Comment 24 Georgiy Treyvus 2012-06-19 21:01:35 UTC
Also this isn't about yelling loud. I just remember where I came from and what it felt like to be a n00b. I can code and reasonably well too. The only problem is I still have trouble auditing source archives on the basis of their sheer size but otherwise I wouldn't just be yelling loud you'd have an actual patch. The only reason I'm asking you to invest time in it is because I and many other users feel this is needed and it's faster than doing it myself. Sure I can read some docs annoy the daylights out of you guys asking what is this function or class for and produce a patch which may or may not satisfy you guys. However asking people who know these systems inside out and can probably fix this in 15 minutes for the needed changes while presenting a logical basis for doing so is much more efficient with respect to my time and yours. Also I just might swing by the brainstorm joint on the forums...
Comment 25 Georgiy Treyvus 2012-06-19 21:07:01 UTC
Ok why then is KRunner treated as a normal window?
This doesn't happen in GNOME. In fact when setting the Show Desktop keybinding in GNOME it says "Hide all normal windows"...
Comment 26 Thomas Lübking 2012-06-19 21:10:04 UTC
a) Show Desktop works mostly correct as it is (well, besides a bug i currently trace)
Period!

b) Nobody, i repeat NOBODY! has questioned nor even denied the request to minimize all windows - especially not me (/I/ did NOT raise the stupid "who wants to" question "from hell"...)

c) One thing has to do nothing (NOT A THING) to do with the other, is that so incredibly hard to understand?

d) This "thing" is no longer even near a serious bug report or feature request but just a place for trolls - so i wish you much fun trolling around, the bug just made it to my spam assassin.

Re-approach as soon as you grew up.
Comment 27 Martin Flöser 2012-06-19 21:12:39 UTC
(In reply to comment #24)
> The only reason I'm asking you to invest time in it is because
> I and many other users feel this is needed
Please point me to where there are the "many other users". This bug has 8 CC entries, from which one is kwin, one is a downstream and one is kde-quality member. In addition the bug has 22 votes, given that you can give as much as 20 votes on a single bug means nothing. Compare that to the millions of users KDE has. There is no indication that there is any demand for this requested feature adjustment.

And as we know that we cannot get the numbers in bugzilla we have established brainstorm.forum.kde.org to get a proper view on required features and undesired one. This means that developers will only adjust the default behavior if there is actual demand for a feature shown in brainstorm and not by some strong discussion of few people in bugzilla.
Comment 28 Martin Flöser 2012-06-19 21:13:26 UTC
(In reply to comment #25)
> Ok why then is KRunner treated as a normal window?
> This doesn't happen in GNOME. In fact when setting the Show Desktop
> keybinding in GNOME it says "Hide all normal windows"...
Repeat after me: it is irrelevant how other environments implement this feature.
Comment 29 Luke 2012-06-19 21:27:48 UTC
OK, we really need to calm down.

@Thomas:
I would post it as an attachment but it's above 1MB, don't know where else to put it and I don't know what happens.
If you'd watch screencast you'd know that I use virtual desktops. I even use pager functionality "on click > show desktop". Issue is not about virtual desktops. I'm kinda lost, what bug are you working on right now?

@Martin: 
I'm not sure if I undertand you correctly with this:

>*correct* behavior implies that the "show desktop" mode is ended whenever a window is opened again

because if you click show desktop and open new window e.g. dolphin, "show desktop" mode will not end up, previously minimized windows _won't_ show up. It's all in screencast. But if instead you run alt+f2 previously minimized windows _will_ show up.
Comment 30 zless 2012-06-19 22:34:30 UTC
(In reply to comment #15)
> Created attachment 71954 [details]
> minimizes all windows on current desktop

This video really says everything about what humans expect regardless of what the programming/political correctness/etc is. Windows showing up in your face in a single (krunner) case is unexpected mainly because:

- Alt+F1 (kkickoff launcher) doesn't do the same.
- Restoring an  application from the notification area doesn't do the same.
- Right click on the panel > Icon only Task Manager Settings doesn't do the same.
- Lanching another application from a panel shortcut doesn't do the same.
- Print Screen key launching KSnapshot doesn't do the same.

(In reply to comment #27)
> Please point me to where there are the "many other users". 

I don't think we reached the day when users spend their day on BKO. I guess 8 CC is more than what 95% of bugs here have.
Comment 31 Georgiy Treyvus 2012-06-20 00:54:29 UTC
@Thomas:
Sorry if I was rude. Also the fact that there aren't many people responding to this bug has to do not necessarily with people not caring so much as a lot of them not bothering or knowing how to file a bug report. Arthur Titeica pretty much summed up the rest regarding this point.

I also did some experimentation and thought how best to describe the thing that was bothering me. Luckily I checked back here first and Luke hit the nail on the head when he wrote:
"because if you click show desktop and open new window e.g. dolphin, "show desktop" mode will not end up, previously minimized windows _won't_ show up. It's all in screencast. But if instead you run alt+f2 previously minimized windows _will_ show up."

So @Luke thank you for hitting the nail on the head like that and saving me the trouble.

@Martin: Fair enough. KDE is KDE and comparing us against the Jones's is stupid. However the inconsistency that me and Luke pointed out is still a very valid one.

Anyway since now thanks to Luke we have a very concrete description of the inconsistency thats bothering us hopefully this can be fixed and I will thusly reopen.

If there's anything I can do to help let me know and sorry if I got a bit heated earlier.
Comment 32 Martin Flöser 2012-06-20 04:36:26 UTC
as mentioned in comment #21 do not reopen bugs. Such a behavior is unacceptable.
Comment 33 Thomas Lübking 2012-07-09 23:10:07 UTC
Git commit f9e182068f380fc67b89501bf40f16aa35dd861b by Thomas Lübking.
Committed on 19/06/2012 at 23:12.
Pushed by luebking into branch 'master'.

substitute mapping_state == Withdrawn by m_managed

as the flamewar pointed out, resetShowingDesktop invalidly keeps hidden windows
the reason is that there're several updateVisiblity calls (notably one from the compositor)
which  break the showingDesktop state as a side effect (before ::manage() does it's thing)

Since they also invalidate the Withdrawn mapping state, that will fail as isManaged() test
(it's also invalidly used by the compositor to set up the decoration, isManaged() used to be
true because of the updateVisibility() call before) since the result is never Withdrawn
REVIEW: 105303

M  +2    -1    kwin/client.cpp
M  +2    -1    kwin/client.h
M  +1    -0    kwin/manage.cpp

http://commits.kde.org/kde-workspace/f9e182068f380fc67b89501bf40f16aa35dd861b
Comment 34 Thomas Lübking 2013-11-06 22:37:48 UTC

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