WPF Window not restored on unlocking the machine
I am facing a peculiar behavior. We know about the state toggling of a
window wherein if you click on the taskbar item for that window, it
restores on the screen and if you click it again it hides (minimizes).
I have a WPF window that renders some fairly complex GUI. I active my
window, GUI is rendered and then I maximize or minimize, it works fine.
Now I click on the minimized window from taskbar, it restores the window
on the screen but then if I click it again on the taskbar it wont
minimize. However taskbar appears to be toggled (as in it indicates that
the corresponding window should be minimized.... whereas the window still
is on top).
But like you all, I don't see a BIG issue here. I can ignore this.
The issue comes when I have locked my machine for some time (usually over
remote session). After unlocking my XP machine, that window wont restore
at all ... no matter how much you do right click, restore, maximize on the
taskbar item etc.
Note that this is intermittent and not always happening.
I observe the window in task manager, I see it isn't hanged or it does not
say "not responding". Memory consumption is also under control. So
actually the GUI is not hanged.
One thing to note is that my application was recently rebuilt with x86 CPU
target for it to render on Windows 7 and XP both. But this behavior is
observed on XP and not Windows 7.
If I run my application's old build (any CPU target, XP specific) the
window behaves fine in all situations consistently.
Also I have the source code of my application, using which if I attach
debugger to the not working window and then detach the debugger, the
window is shown! Same thing happens if I attach a memory profiler and
detach and window is reactivates and shows up!
This is a strange behavior and I guess the root lies somewhere in that
original behavior of the window where it is not hiding when I click to
toggle the state of the window on the taskbar.
Can any one of you have insights on this particularly odd behavior of my
WPF application on x86 target on XP?
No comments:
Post a Comment