It would be useful to have "OS X-style" application closing from the window switcher. That is, when alt-tabbing through the window list, the window close shortcut (default: alt-F4), or even minimize shortcut, would be effective. Very neat way to closing down or hiding applications that are not needed. Reproducible: Always Steps to Reproduce: 1. Open several apps/windwos 2. Alt-tab through the windows 3. Hold down Alt and press F4 (or other shortcuts) Actual Results: Nothing happens Expected Results: Shortcut would be effective
It's tricky due to the way global shortcuts work in KDE and the way KWin is intercepting the shortcut system during window switching. For the default shortcut (Alt+F4) this could be hacked together, but it would only work as long as the shortcut uses Alt and window switching uses Alt. Not sure whether it's worth to introduce such a hack which would be rather inconsistent. What I had already thought about was adding a close button to each of the entries in the list. That's actually already possible given that Plasma Active uses it. What do you think about that?
(In reply to comment #1) > It's tricky due to the way global shortcuts work in KDE and the way KWin is > intercepting the shortcut system during window switching. > > For the default shortcut (Alt+F4) this could be hacked together, but it > would only work as long as the shortcut uses Alt and window switching uses > Alt. Not sure whether it's worth to introduce such a hack which would be > rather inconsistent. Would it be possible for the window switcher to have its own shortcuts, that could be configured to have these actions (not necessarily the same as KWin globals are? So that the window switcher could be configured for this action separately from the globals? And I don't also encourage making hacks over consistency :) > What I had already thought about was adding a close button to each of the > entries in the list. That's actually already possible given that Plasma > Active uses it. What do you think about that? Making this as separate mouse-controllable button in the window does not cut it as the original feature, although it might be useful. The idea on the "close-shortcut while swithing" is that it would not interfere with the keyboard workflow, requiring mouse or other control use. Also, what worries me with the extra button that there might be too many bells and whistles visible (of course, the buttons could be shown only on hover, or disabled fully by the user). And also, having extra controls for tweaking all options adds to the complexity (uh-oh, KDE3 :)
It's possible to get the configured global actions from inside the tabbox code and use that shortcut, we'll however have to handle the input events ourselves. The problem about the shortcut restriction however is the severe one and holds: if it does not include the tabbox trigger (Alt) you cannot trigger it w/o letting Alt and with it the tabbox go down - this could READ *could* be compensated by making Alt an ignored modifier, ie. if Alt+F4 is your sc, it just works. If Ctrl+F4 is ... uh- ohhh -> Alt+Ctrl+F4 is taken by the server and will get you to VT4. In other words, this has its pitfalls as well. The more robust approach on this was likely on Present Windows, which can be invoked by a shortcut, but does not automatically close, so we actually could use every shortcut for closing the selected window (next to the already present close button) Either way, if we allow destructive operations in the tabbox, there needs to be at least a hint. Especially if they differ from the global shortcuts. I'm not sure about buttons - means you got to use the left hand on the kbd to trigger the switcher and the right one on the mouse to click the button (or vv.) - sounds combersome.
*** Bug 390194 has been marked as a duplicate of this bug. ***
In Bug 390194, Martin said: > For what is worth to mention: the backend supports closing a window and > exports it the QtQuick side. Just do: model.close(currentIndex) from Qml > side to close the currently selected window. I think adding a visible button would be nice too.
Blocked by Bug 370185, which makes it so that the window doesn't get keyboard focus. Once that's fixed, it should be as simple as calling `model.close(currentIndex)` with the specified keyboard shortcut.
Working on this...
Here's a patch for everything but the default Breeze switcher: https://phabricator.kde.org/D16897 The default Breeze switcher now works for general keyboard navigation using the arrow keys, but I'm having trouble getting the close functionality working using the same approach. Still hacking on it.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/115
The new default task switcher (thumbnails grid) in plasma 6 has a close button. Marking the bug report as resolved. If other task switchers lack close buttons, please file bug reports for kdeplasma-addons.
This feature request is about using the keyboard shortcut (AKA Ctrl+W) to close the active window from the Task Switcher, not a clickable button.
*** Bug 482776 has been marked as a duplicate of this bug. ***
"DEL" button or the "middle mouse button" would work for me as well
(In reply to 3kc2awgy from comment #13) > "DEL" button or the "middle mouse button" would work for me as well In this context shortcut means keyboard shortcuts, not mouse operations. Not to overrule that mouse usage would be out of place either. But main point is the keyboard shortcut. And essentially the shortcut to be accessible with minimal effort in relation to the window cycle shortcut, e.g., Alt+Tab cycles through windows, so you could have the (user-settable) close shortcut for example at Alt+Q, to just quickly close the window, nothing else. It is a really simple but very usable detail in OS X / Mac OS, to get rid of the passive applications in the background.
alt q sounds like a good idea
*** Bug 497839 has been marked as a duplicate of this bug. ***