[SHELL32]
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Fri, 9 Oct 2015 00:31:47 +0000 (00:31 +0000)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Fri, 9 Oct 2015 00:31:47 +0000 (00:31 +0000)
- "Fix" SHChangeNotifyRegister to report file system changes. I am not really sure if these changes are correct but really make it work now.
CORE-1171

svn path=/trunk/; revision=69469

reactos/dll/win32/shell32/CDefView.cpp
reactos/dll/win32/shell32/wine/changenotify.c

index 3004bdd..3b3ad24 100644 (file)
@@ -1979,7 +1979,7 @@ LRESULT CDefView::OnChangeNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &
 
     TRACE("(%p)(%p,%p,0x%08x)\n", this, Pidls[0], Pidls[1], lParam);
 
 
     TRACE("(%p)(%p,%p,0x%08x)\n", this, Pidls[0], Pidls[1], lParam);
 
-    switch (lParam)
+    switch (lParam &~ SHCNE_INTERRUPT)
     {
         case SHCNE_MKDIR:
         case SHCNE_CREATE:
     {
         case SHCNE_MKDIR:
         case SHCNE_CREATE:
index c87e19a..c1483b0 100644 (file)
@@ -378,11 +378,11 @@ void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID
     }
 
     if( ( ( wEventId & SHCNE_NOITEMEVENTS ) && 
     }
 
     if( ( ( wEventId & SHCNE_NOITEMEVENTS ) && 
-          ( wEventId & ~SHCNE_NOITEMEVENTS ) ) ||
+          ( wEventId & ~(SHCNE_NOITEMEVENTS | SHCNE_INTERRUPT) ) ) ||
         ( ( wEventId & SHCNE_ONEITEMEVENTS ) && 
         ( ( wEventId & SHCNE_ONEITEMEVENTS ) && 
-          ( wEventId & ~SHCNE_ONEITEMEVENTS ) ) ||
+          ( wEventId & ~(SHCNE_ONEITEMEVENTS | SHCNE_INTERRUPT) ) ) ||
         ( ( wEventId & SHCNE_TWOITEMEVENTS ) && 
         ( ( wEventId & SHCNE_TWOITEMEVENTS ) && 
-          ( wEventId & ~SHCNE_TWOITEMEVENTS ) ) )
+          ( wEventId & ~(SHCNE_TWOITEMEVENTS | SHCNE_INTERRUPT) ) ) )
     {
         WARN("mutually incompatible events listed\n");
         return;
     {
         WARN("mutually incompatible events listed\n");
         return;
@@ -692,12 +692,14 @@ _NotificationCompletion(DWORD dwErrorCode, // completion code
     LPNOTIFYREGISTER item = (LPNOTIFYREGISTER) lpOverlapped->hEvent;
     TRACE("_NotificationCompletion\n");
 
     LPNOTIFYREGISTER item = (LPNOTIFYREGISTER) lpOverlapped->hEvent;
     TRACE("_NotificationCompletion\n");
 
+#if 0
     if (dwErrorCode == ERROR_OPERATION_ABORTED)
     {
         /* Command was induced by CancelIo in the shutdown procedure. */
         TRACE("_NotificationCompletion ended.\n");
         return;
     }
     if (dwErrorCode == ERROR_OPERATION_ABORTED)
     {
         /* Command was induced by CancelIo in the shutdown procedure. */
         TRACE("_NotificationCompletion ended.\n");
         return;
     }
+#endif
 
     /* This likely means overflow, so force whole directory refresh. */
     if (!dwNumberOfBytesTransfered)
 
     /* This likely means overflow, so force whole directory refresh. */
     if (!dwNumberOfBytesTransfered)