https://bugs.kde.org/show_bug.cgi?id=399234

Konrad Materka <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #12 from Konrad Materka <[email protected]> ---
I found few interesting things but I need a help from a more experienced
developer.


1. Kai Uwe Broulik was right:
<< It seems Wine staging sets a window mask on the SNI depending on the icon.
Since the icon is a circle, our emulated mouse click at the top left of the
window ends up "clicking through".>>

He is right. In the file sniproxy.cpp
(https://github.com/KDE/plasma-workspace/blob/master/xembed-sni-proxy/sniproxy.cpp),
whhen I added:
  configVals[0] -= clientGeom->width / 2;
  configVals[1] -= clientGeom->height / 2;
before line 491:
  xcb_configure_window(c, m_containerWid, XCB_CONFIG_WINDOW_X |
XCB_CONFIG_WINDOW_Y, configVals);
context menu appeared. Now it clicks in the middle of the tray icon limiting a
problem of transparent icons.

2. That was half of the success. The second issue is very tricky, I was not
able to find satisfying workaround. Right click sends 2 "ContextMenu" signals,
not one. As a result two clicks are emulated.
First signal is send on mouse down event.
Second signal is send on mouse up event or after around 1 second, depending on
which is earlier.
For some reason wine doe not like that. Menu appears but it's not possible to
click anything. I found two ugly workarounds:
2.1 Right click and hold mouse button. When menu appears, before 1 second
passes, quickly move mouse pointer outside of icon area. This prevents second
event (mouse up) and second emulated click to be send.
2.2 Add "QThread::sleep(10);" somewhere in the "sendClick" function. 10
miliseconds is enough, but this is ugly as hell and very unreliable - sometimes
menu appears, sometimes after few seconds. Anyway, maybe this will give a clue
and help someone to find correct fix.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to