Author: ssawant
Date: Tue Aug 22 14:59:03 2017
New Revision: 75641
URL: http://svn.reactos.org/svn/reactos?rev=75641&view=rev
Log:
[STOBJECT]
-Added the proper enumeration filters required for safely removable devices a.k.a hotplug module.
-Minor cleanup.
Modified:
branches/GSoC_2017/shellext/reactos/dll/shellext/stobject/hotplug.cpp
Modified: branches/GSoC_2017/shellext/reactos/dll/shellext/stobject/hotplug.cpp
URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2017/shellext/reactos/dll/…
==============================================================================
--- branches/GSoC_2017/shellext/reactos/dll/shellext/stobject/hotplug.cpp [iso-8859-1] (original)
+++ branches/GSoC_2017/shellext/reactos/dll/shellext/stobject/hotplug.cpp [iso-8859-1] Tue Aug 22 14:59:03 2017
@@ -54,7 +54,11 @@
if (cr != CR_SUCCESS)
continue;
- if ((dwCapabilities & CM_DEVCAP_REMOVABLE) && (dwCapabilities & CM_DEVCAP_UNIQUEID) && !ulPnum)
+ if ( (dwCapabilities & CM_DEVCAP_REMOVABLE) &&
+ !(dwCapabilities & CM_DEVCAP_DOCKDEVICE) &&
+ !(dwCapabilities & CM_DEVCAP_SURPRISEREMOVALOK) &&
+ ((dwCapabilities & CM_DEVCAP_EJECTSUPPORTED) || (ulStatus & DN_DISABLEABLE)) &&
+ !ulPnum)
{
devList.Add(did.DevInst);
}
@@ -85,12 +89,17 @@
StringCchCopy(nim.szInfo, _countof(nim.szInfo), szInfo);
BOOL ret = Shell_NotifyIcon(NIM_MODIFY, &nim);
- Sleep(8000);
+ Sleep(10000); /* As per windows, the balloon notification remains visible for atleast 10 sec.
+ This timer maintains the same condition.
+ Also it is required so that the icon doesn't hide instantly after last device is removed,
+ as that will prevent popping of notification.
+ */
StringCchCopy(nim.szInfoTitle, _countof(nim.szInfoTitle), L"");
StringCchCopy(nim.szInfo, _countof(nim.szInfo), L"");
ret = Shell_NotifyIcon(NIM_MODIFY, &nim);
- g_IsRemoving = FALSE;
-
+ g_IsRemoving = FALSE; /* This flag is used to prevent instant icon hiding after last device is removed.
+ The above timer maintains the required state for the same.
+ */
return ret ? S_OK : E_FAIL;
}
Author: gadamopoulos
Date: Tue Aug 22 08:02:30 2017
New Revision: 75637
URL: http://svn.reactos.org/svn/reactos?rev=75637&view=rev
Log:
[OLE32] -Recreate the clipboard window if it isn't a valid window handle. Can happen if the thread that first used the ole clipboard exists which also leads to the clipboard window being destroyed.
Modified:
trunk/reactos/dll/win32/ole32/clipboard.c
Modified: trunk/reactos/dll/win32/ole32/clipboard.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/clipboard.…
==============================================================================
--- trunk/reactos/dll/win32/ole32/clipboard.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ole32/clipboard.c [iso-8859-1] Tue Aug 22 08:02:30 2017
@@ -1869,6 +1869,12 @@
*/
static inline HRESULT get_clipbrd_window(ole_clipbrd *clipbrd, HWND *wnd)
{
+#ifdef __REACTOS__
+ /* The clipboard window can get destroyed if the thread that created it dies so we may need to create it again */
+ if (!IsWindow(clipbrd->window))
+ clipbrd->window = create_clipbrd_window();
+#endif
+
if ( !clipbrd->window )
clipbrd->window = create_clipbrd_window();