1

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 to the desktop and if you click it again it hides (minimizes).

I have a WPF window that renders some fairly complex GUI. When I activate my window, GUI is rendered and then if I maximize or minimize, it works fine. Now if I click on the minimized window from taskbar, it restores the window to the desktop, 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 is still 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 won't restore at all ... no matter how many times I 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 hung and does not say "not responding". Memory consumption is also under control. So actually the GUI is not hung.

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 reactivated and shows up!

This is a strange behavior and I guess the root cause lies somewhere in the original behavior of the window where it is not hiding when I click to toggle the state of the window on the taskbar.

Does anyone have insights on this particularly odd behavior of my WPF application on x86 target on XP?

4

0 回答 0