Fixed issue #20 (opacity / fullscreen switching bug).

This commit is contained in:
Lorenz Cuno Klopfenstein 2011-02-03 17:24:39 +01:00
parent 4abb6f4a7d
commit f340fa546c
2 changed files with 4 additions and 3 deletions

View file

@ -85,7 +85,7 @@ namespace OnTopReplica {
};
foreach (ToolStripMenuItem i in items) {
if ((double)i.Tag == this.Opacity)
if (((double)i.Tag) == this.Opacity)
i.Checked = true;
else
i.Checked = false;
@ -96,9 +96,10 @@ namespace OnTopReplica {
//Get clicked menu item
ToolStripMenuItem tsi = sender as ToolStripMenuItem;
if (tsi != null) {
if (tsi != null && this.Visible) {
//Get opacity from the tag
this.Opacity = (double)tsi.Tag;
Program.Platform.OnFormStateChange(this);
}
}

View file

@ -47,7 +47,7 @@ namespace OnTopReplica.Platforms {
//Note that when minimized, it will be shown as an (ugly) minimized tool window
//thus we do not minimize, but set to transparent when hiding
WindowMethods.SetWindowLong(form.Handle, WindowMethods.WindowLong.ExStyle,
(IntPtr)WindowMethods.WindowExStyles.ToolWindow);
(IntPtr)(WindowMethods.WindowExStyles.ToolWindow | WindowMethods.WindowExStyles.Layered));
}
}