File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -163,9 +163,18 @@ QgsNative::NotificationResult QgsWinNative::showDesktopNotification( const QStri
163
163
return result;
164
164
}
165
165
166
- bool QgsWinNativeEventFilter::nativeEventFilter ( const QByteArray &, void *message, long * )
166
+ bool QgsWinNativeEventFilter::nativeEventFilter ( const QByteArray &eventType , void *message, long * )
167
167
{
168
+ static const QByteArray sWindowsGenericMSG { " windows_generic_MSG" };
169
+ if ( eventType != sWindowsGenericMSG )
170
+ return false ;
171
+
168
172
MSG *pWindowsMessage = static_cast <MSG *>( message );
173
+ if ( pWindowsMessage->message != WM_DEVICECHANGE )
174
+ {
175
+ return false ;
176
+ }
177
+
169
178
unsigned int wParam = pWindowsMessage->wParam ;
170
179
if ( wParam == DBT_DEVICEARRIVAL || wParam == DBT_DEVICEREMOVECOMPLETE )
171
180
{
You can’t perform that action at this time.
0 commit comments