Wine is using XWindow Shape Extension for transparent tray icons.
We need to find first clickable point starting from top-left.
BUG: 399234
davidedmundson |
Plasma: Workspaces |
Wine is using XWindow Shape Extension for transparent tray icons.
We need to find first clickable point starting from top-left.
BUG: 399234
Bug fix test:
Regression test:
Lint Skipped |
Unit Tests Skipped |
Thanks for doing some work on xembedsniproxy!
xembed-sni-proxy/sniproxy.cpp | ||
---|---|---|
239 ↗ | (On Diff #62621) | This is quite expensive to do every frame (some animate), I think we can do something else, see below. |
530 ↗ | (On Diff #62621) | I don't think clickpoint has to be a member variable, we only use it within the context of this method. We can make it a local variable evaluated within sendClick. Relative to frame updates, clicks are quite rare. |
551 ↗ | (On Diff #62621) | + m_clickPoint ? |
Review changes. Call to the calculateClickPoint is local and on only on mouse click, not on every icon update.
xembed-sni-proxy/sniproxy.cpp | ||
---|---|---|
576 | This point was marked as closed, but not changed. Probably my fault for not expanding. We move the window so that it's at x-clickPoint The absolute position of the click should be offset by the same amount. I would have expected
in both places |
xembed-sni-proxy/sniproxy.cpp | ||
---|---|---|
576 | root_x/root_y coordinates are relative to the root window (in most cases = screen). Local x and y variables hold coordinates of the pointer, which is also relative to the root window. We are not changing pointer position nor root window position. | |
239 ↗ | (On Diff #62621) | You are correct, calculate click point might be heavy (when set, it goers thou all window regions and calculates vector length). I will change that. |
530 ↗ | (On Diff #62621) | You are correct, calculate click point might be heavy (when set, it goers thou all window regions and calculates vector length). I will change that. |
551 ↗ | (On Diff #62621) | Root X/Y should remain the same, we are not moving mouse pointer, only the underlying window. GTK is checking mouse state and mosue location, better not to mess with it. |