Focus behaviour: raise_on_click should include right/middle mouse buttons; raise_with_any should ignore scrolling
Submitted by Christian Klomp
Assigned to Olivier Fourdan @olivier
Description
Created attachment 7125 Adds the right and middle mouse buttons to the raise_on_click option
Coming from Gnome I am used the following workflow (I also think Windows now works like this). I want to be able to:
- also activate windows with a right click e.g., so that I can paste commands from a text file into a terminal and immediately change or execute them;
- use the mousewheel to scroll in a window that is not focused so that I can look up info and continue typing in the window that is focused.
Currently when raise_on_click is enabled windows will not be focused with a right click. This causes confusion because any subsequent input will go to the original window (e.g., the selected text from the file from which text was copied might be replaced by a return or some other characters that were meant for the terminal).
This can be remedied by enabling raise_with_any, however this conflicts with use case 2.
I think that people generally would expect that raise_on_click at the very least also includes right clicks (and most likely also middle click paste but I rarely use this functionality so am not sure). Furthermore I think that generally people do not want to change focus when scrolling even when the raise_with_any option is enabled. Currently I do not have xfce installed on a laptop so have not thought about how this affects touchpads and other input devices.
I reckon this behaviour is quite subjective and depends highly on what one is used to, but I would urge the developers to think about changing the default behaviour such that most users experience the expected behaviour.
In my opinion the most straightforward solution is to also include the right and middle mouse buttons in the raise_on_click option by default. In case this is too controversial possibly additional xfwm tweaks could be added at the cost of potentially unexpected default behaviour and unnecessary complexity.
I have made three simple patches that can each be used to enable my work flow. Disclaimer: I am not a c programmer so make sure to check the code for errors and unintended side effects.
This bug report is similar to the following bugs:
I have chosen to open a new report because they are both filed against the description instead of the behaviour. While I think the description should reflect the behaviour better I also think the behaviour should be changed.
It is also similar to https://bugzilla.xfce.org/show_bug.cgi?id=2861 but that one is only about middle click paste.
Patch 7125, "Adds the right and middle mouse buttons to the raise_on_click option":
raise_on_click-with-right-and-middle.patch
Version: 4.12.0