! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Middle click on task list item to close window
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Xfce4-panel
Component:
Window Buttons

Comments

Description Daniel Bolton 2011-11-01 20:13:10 CET
I would like to be able simply to middle-click on an item in the task list to close it, as opposed to right-clicking the item then clicking "Close".

I think assigning middle-click to close an item would be intuitive to many users, since this is the default action on tabs in most web browsers, including Firefox and Midori.

One potential problem lies with grouped items. Possible courses of action would be: 1) ignore the middle-click on grouped items, 2) close all items in the group, 3) close the last focused item in the group.

It would be really nice if you could configure what each mouse button does, similar to tint2. For example, other window actions (like lower/raise, shade, minimize/maximize) could be assigned to left/right click, middle click, or mouse wheel up/down in the "Properties" dialog. 

However, this latter approach would probably only work with xfwm, so it wouldn't help people who use xfce4-panel with other window managers, like Openbox.
Comment 1 klawd+xfce 2012-04-01 14:31:27 CEST
I second this motion!

It would be highly intuitive to close Tasks via middle-click since it has become a defacto standard to close tabs/tasks with the middle mouse.
Examples:
Browsers
Eclipse, IDEA and other IDEs
Even the Xfce Terminal Emulator tabs can be closed via middle mouse.
Comment 2 trtht 2012-06-18 10:29:00 CEST
See http://forum.xfce.org/viewtopic.php?id=6238
The patch is missing almost everything (ability to turn off the feature), but it shows the functionality described.
Comment 3 wkrekik 2012-06-18 14:52:45 CEST
+1, very useful when you have to close multiple instances of one application. Another useful feature would be to display the number of opened windows of an application in grouping mode as does dockbarx and awn, but it's another story...
Comment 4 Andre Miranda editbugs 2012-10-16 01:26:39 CEST
Created attachment 4667 
Patch
Comment 5 Andre Miranda editbugs 2012-10-16 01:27:37 CEST
Finally I've taken some time and hacked the tasklist properly.
Patch against master attached.

What it does:
+Close windows on middle mouse button on the tasklist, but only if the mouse is still over the same window on the release button event.
+Option to turn it on/off

This is my first patch here, I hope it's helpful :D
Comment 6 Andrzej editbugs 2013-04-28 15:52:00 CEST
Hi André. The patch looks good. After minor corrections (indentation and default value in property install) I have pushed the patch to master. Thanks!
Comment 7 Nick Schermer editbugs 2013-04-30 07:43:13 CEST
There now is a mnemonic conflict in the preferences dialog. Bug is still open too.
Comment 8 Andre Miranda editbugs 2013-05-01 18:13:57 CEST
I've just cloned master and didn't see the mnemonic conflict. Is it the "_Close..." string?
Comment 9 Andre Miranda editbugs 2013-07-09 00:33:12 CEST
Nick, I've been using the GIT master for while without problems. If there's a mnemonic conflict, please point it out so I or maybe Andrzej would be able to fix it. Otherwise let's close this bug.
Thanks.
Comment 10 Andre Miranda editbugs 2013-10-30 02:15:18 CET
Nick, when this bug is going to be closed?
I can see you have extended the middle click action in this commit:
http://git.xfce.org/xfce/xfce4-panel/commit/?id=1bb2209b1fba3c128d9596fa9d29b17649f3fca0
Comment 11 Steve Dodier-Lazaro editbugs 2015-02-09 15:53:07 CET
Cycling through old bugs. Thanks Andre for putting the patch together :-)
Comment 12 Simon Dedman 2015-09-22 14:42:29 CEST
Spamming this at the end of all the threads about this, since anyone looking for this only cares about this info (now it's been patched - thanks guys!):

Right click on Panel > Panel preferences > Items > Window Buttons > Settings > Behaviour : Middle Click Action

Bug #8096

Reported by:
Daniel Bolton
Reported on: 2011-11-01
Last modified on: 2015-09-22

People

Assignee:
Nick Schermer
CC List:
10 users

Version

Version:
Unspecified

Attachments

Patch (5.35 KB, patch)
2012-10-16 01:26 CEST , Andre Miranda
no flags

Additional information