CONFIGURATION: Kwin 5.9.4 on Kubuntu 17.04 SUMMARY: When a window is maximized, the buttons in the top-left and top-right corners get their click areas extended so that they can easily be triggered by a click in the screen's corner pixels. This behavior should also apply to windows that are tiled. STEPS TO REPRODUCE: 1. Maximize a window 2. Slam your cursor into the top-right corner of the screen and click 3. Observe that the close button is triggered and the window closes, even though the cursor was a few pixels away from the close button (thereby correctly taking advantage of Fitt's Law https://en.wikipedia.org/wiki/Fitts's_law) 4. Tile a window so that it takes up the right side of the screen or the top-right corner and the close button is in the same place as it would be if the window was maximized 5. Slam your cursor into the top-right corner of the screen and click EXPECTED RESULTS: The close button is triggered and the window closes, just as if it were maximized. ACTUAL RESULTS: The close button is not triggered, because its click area is not extended to cover the corner pixel. Instead a window resize operation begins.
Which window decoration are you using?
The standard set of buttons with the Breeze theme/window decoration.
Created attachment 107239 [details] Screen recording showing the issue I'm attaching a screen recording in case my description is unclear.
Hi, Thanks for posting the suggestion, it is a valid point. I have code here that adds the requested feature, but (and this is why I re-add kwin in cc): 1/ for buttons on the left, it does not work, never did it seems, because there seems to be a "dead" one pixel on the side. (also true with plastique, and any decoration I have tested) 2/ for buttons on the right, it works, except that if you put the cursor in the top right corner, although the button appears hovered (and react as it should on press), the mouse cursor is still changed to the "diagonal" one, indicating that you could "resize" the window (which you cant) As far as I know, which cursor is drawn in which location is handled by kwin (or kdecoration2), not by the decoration itself, so I have no control over this. Martin: can you have a look ? If that helps I can commit the code I have written, even if imperfect. Best, Hugo
Hi Hugo, Thanks for working on this! Feel free to post your patch on phabricator for review and suggestions. https://phabricator.kde.org/
Fixed in https://phabricator.kde.org/R31:629b0698535a7210a49ab2825b44e156e1eae8a5