masghar / yet-another-music-application

Automatically exported from code.google.com/p/yet-another-music-application
0 stars 0 forks source link

Stoffi does not restore if minimised and another instance is started #333

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open Stoffi and minimise it.
2. Right click on the taskbar icon and click on Stoffi Beta again.
3.

What should have happened?
Stoffi should be restored.

What happened instead?
Nothing. Stoffi remains minimised.

Can you give us any additional information that could be useful in fixing
this bug?
Most applications work this way, try Windows Explorer. If the application is 
already open, and only one instance is allowed, then restore the instance that 
is already open.

What release of Stoffi are you using (Xia or Shang)?
Zhou

If you are using alpha or beta, please state which:
Beta Three

Original issue reported on code.google.com by wic...@gmail.com on 22 Apr 2012 at 7:42

GoogleCodeExporter commented 9 years ago
Actually, Explorer allows several instances.

Anyway, it also doesn't raise itself to front if it's not minimized, just 
hidden. I have a faint memory of trying to fix this issue before, but got some 
response on MSDN that they didn't allow applications to raise themselves to the 
front because that could be exploited by evil programmers. Since it is 
obviously possible it may be that they either restricted it in .NET/WPF or they 
just don't want me to find it.

I shall try once again to crush this bug.

Original comment by christof...@stoffiplayer.com on 24 Apr 2012 at 12:27

GoogleCodeExporter commented 9 years ago
Found it! The original Stoffi window is not allowed to raise itself to the 
front (because that can cause problems if programmers are either stupid or 
evil).

However, the new instance (the one that should send arguments to the original 
instance and then die) has the right to raise any window (because this instance 
is the one who is currently in control of the front). So I just raise the 
original window before I die. :D

Original comment by christof...@stoffiplayer.com on 24 Apr 2012 at 4:39

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1058.

Original comment by christof...@stoffiplayer.com on 24 Apr 2012 at 4:42