Reset both the descriptor and changed flag when the current context is
removed. Don't make this dependent on the context being valid or
being found by monitor_resolve(), in case the context was closed due
to some type of error condition.
{
MONITORINFO info, info2;
+ if (!buffy)
+ {
+ MonitorContextDescriptor = -1;
+ MonitorContextChanged = 0;
+ }
+
if (monitor_resolve (&info, buffy) != RESOLVERES_OK_EXISTING)
return 2;
- if (!buffy && (MonitorContextDescriptor == info.monitor->descr))
- MonitorContextDescriptor = -1;
-
if (Context)
{
if (buffy)