[MSPAINT] Due to the previous fix changing the selection opacity now behaved oddly...
authorBenedikt Freisen <b.freisen@gmx.net>
Thu, 6 Feb 2014 14:08:59 +0000 (14:08 +0000)
committerBenedikt Freisen <b.freisen@gmx.net>
Thu, 6 Feb 2014 14:08:59 +0000 (14:08 +0000)
svn path=/trunk/; revision=62012

reactos/base/applications/mspaint/toolsettings.c

index 920fe51..49a17eb 100644 (file)
@@ -184,10 +184,13 @@ SettingsWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                         transpBg = (y - 2) / 31;
                         InvalidateRect(hwnd, NULL, TRUE);
 
-                        /* force refresh of selection contents */
-                        SendMessage(hSelection, WM_LBUTTONDOWN, 0, MAKELPARAM(0, 0));
-                        SendMessage(hSelection, WM_MOUSEMOVE, 0, MAKELPARAM(0, 0));
-                        SendMessage(hSelection, WM_LBUTTONUP, 0, MAKELPARAM(0, 0));
+                        if (IsWindowVisible(hSelection))
+                        {
+                            /* force refresh of selection contents */
+                            SendMessage(hSelection, WM_LBUTTONDOWN, 0, MAKELPARAM(0, 0));
+                            SendMessage(hSelection, WM_MOUSEMOVE, 0, MAKELPARAM(0, 0));
+                            SendMessage(hSelection, WM_LBUTTONUP, 0, MAKELPARAM(0, 0));
+                        }
                     }
                     break;
                 case TOOL_RUBBER: