I have configured my right mouse button to activate windows without passing the click ("Window Management"->"Window Behaviour"->"Window Actions" tab->"Inactive Inner Window Actions"->"Right Click"->"Activate"), and it works within the window contents, but if I right-click on titlebars or borders, I still get the popup menus. I realise "Inner Window" suggests this is by design, but I do not see a way to configure identical behaviour on the "Titlebar Actions" tab either. So when I want to remove focus from my active window, I have to pay careful attention *not* to click a decoration, otherwise I end up with an unwanted popup and focus doesn't change (so I need to try again).
This bug was reported against an outdated version of KWin. We have made many changes since the. If the issue persists in newer versions can you reopen the bug report updating the version number.