Discussion:
[Interest] Change of indirection of message pointer in nativeEvent()?
Olivier B.
2018-10-24 07:17:48 UTC
Permalink
With Qt 5.6.2, i used nativeEvent() to capture Windows minimize
command. I casted the void* message into a MSG* and could read it
properly

Now, with Qt 5.11.1, this did not detect the messages anymore.
Debugging, i noticed that at the call of
QWindowSystemInterface::handleNativeEvent() by filterNativeEvent(),
the MSG* is not casted as void*, but we pass the address of the MSG*
in the void* argument.
So now, in nativeEvent(), to properly decode the message, i have to
cast the void* to LPMSG, then dereference it to get the original MSG*

Was that change intentionnal?
Olivier B.
2018-10-24 08:48:00 UTC
Permalink
Nevermind, it is https://bugreports.qt.io/browse/QTBUG-69074
Le mer. 24 oct. 2018 à 09:17, Olivier B.
Post by Olivier B.
With Qt 5.6.2, i used nativeEvent() to capture Windows minimize
command. I casted the void* message into a MSG* and could read it
properly
Now, with Qt 5.11.1, this did not detect the messages anymore.
Debugging, i noticed that at the call of
QWindowSystemInterface::handleNativeEvent() by filterNativeEvent(),
the MSG* is not casted as void*, but we pass the address of the MSG*
in the void* argument.
So now, in nativeEvent(), to properly decode the message, i have to
cast the void* to LPMSG, then dereference it to get the original MSG*
Was that change intentionnal?
Loading...