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

--- Comment #15 from Simone Gaiarin <simg...@gmail.com> ---
Some thoughts from my debug session:

The culprit is in browsemanager.cpp, method eventFilter (Kdevelop at tag 5.3.2)

When the Ctrl key is pressed, we enter the first 'if' (line 178) because
keyEvent->key() == browseKey
and browseMode is activated. m_browsingByKey is set.
The event at this point is QKeyEvent(KeyPress, Key_Control, ControlModifier)

When Ctrl is released, m_broswingByKey should be unset at line 216, but here we
fail to enter the if because we have QKeyEvent(KeyRelease, 0, ControlModifier),
so that the condition keyEvent->key() == m_browsingByKey is not satisfied.

Given that m_broswingByKey is not unset, as soon we move the mouse we enter
eventFilter again and we skip the if at line 233, where we should reset the
cursor and return. Instead we proceed to the next if where setHandCursor is
called.

Basically the problem is that the event we receive when we release Ctrl is
QKeyEvent(KeyRelease, 0, ControlModifier) instead of QKeyEvent(KeyPress,
Key_Control, ControlModifier) and we miss it.


For some reason when the python language plugin is not active we re-enter
eventFilter few more times after moving the mouse up to the point where
m_browsingByKey is unset and everything goes back to normal. (This interaction
is still not clear to me). Nonetheless I think the problem is not in the plugin
but in KDevelop itself. It should catch the KeyRelease event correctly.

I see if I can think a way to fix this.

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

Reply via email to