diff --git a/BizHawk.Client.EmuHawk/CustomControls/ToolStripEx.cs b/BizHawk.Client.EmuHawk/CustomControls/ToolStripEx.cs
index fe7a40bf41..bfe6182d4b 100644
--- a/BizHawk.Client.EmuHawk/CustomControls/ToolStripEx.cs
+++ b/BizHawk.Client.EmuHawk/CustomControls/ToolStripEx.cs
@@ -73,6 +73,41 @@ public class MenuStripEx : MenuStrip
}
}
+///
+/// This class adds on to the functionality provided in System.Windows.Forms.MenuStrip.
+///
+public class StatusStripEx : StatusStrip
+{
+ private bool clickThrough = true;
+
+ ///
+ /// Gets or sets whether the ToolStripEx honors item clicks when its containing form does
+ /// not have input focus.
+ ///
+ public bool ClickThrough
+ {
+ get
+ {
+ return clickThrough;
+ }
+ set
+ {
+ clickThrough = value;
+ }
+ }
+
+ protected override void WndProc(ref Message m)
+ {
+ base.WndProc(ref m);
+ if (clickThrough &&
+ m.Msg == NativeConstants.WM_MOUSEACTIVATE &&
+ m.Result == (IntPtr)NativeConstants.MA_ACTIVATEANDEAT)
+ {
+ m.Result = (IntPtr)NativeConstants.MA_ACTIVATE;
+ }
+ }
+}
+
internal sealed class NativeConstants
{
private NativeConstants(){}
diff --git a/BizHawk.Client.EmuHawk/MainForm.Designer.cs b/BizHawk.Client.EmuHawk/MainForm.Designer.cs
index 7baa472236..7f9d5691e8 100644
--- a/BizHawk.Client.EmuHawk/MainForm.Designer.cs
+++ b/BizHawk.Client.EmuHawk/MainForm.Designer.cs
@@ -284,7 +284,7 @@
this.OnlineHelpMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ForumsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.AboutMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.MainStatusBar = new System.Windows.Forms.StatusStrip();
+ this.MainStatusBar = new StatusStripEx();
this.DumpStatusButton = new System.Windows.Forms.ToolStripDropDownButton();
this.EmuStatus = new System.Windows.Forms.ToolStripStatusLabel();
this.PlayRecordStatusButton = new System.Windows.Forms.ToolStripDropDownButton();
@@ -3248,7 +3248,7 @@
private System.Windows.Forms.ToolStripMenuItem ToolBoxMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator12;
private System.Windows.Forms.ToolStripMenuItem SwitchToFullscreenMenuItem;
- private System.Windows.Forms.StatusStrip MainStatusBar;
+ private StatusStripEx MainStatusBar;
private System.Windows.Forms.ToolStripStatusLabel EmuStatus;
private System.Windows.Forms.ToolStripMenuItem MessagesMenuItem;
private System.Windows.Forms.ToolStripMenuItem TI83SubMenu;
diff --git a/BizHawk.Client.EmuHawk/tools/NES/NESPPU.Designer.cs b/BizHawk.Client.EmuHawk/tools/NES/NESPPU.Designer.cs
index 35fd3a4b41..06038b8fbe 100644
--- a/BizHawk.Client.EmuHawk/tools/NES/NESPPU.Designer.cs
+++ b/BizHawk.Client.EmuHawk/tools/NES/NESPPU.Designer.cs
@@ -101,7 +101,7 @@
this.SaveWindowPositionMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.AlwaysOnTopMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.FloatingWindowMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.NesPPUStatusBar = new System.Windows.Forms.StatusStrip();
+ this.NesPPUStatusBar = new StatusStripEx();
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
this.Messagetimer = new System.Windows.Forms.Timer(this.components);
this.CHRROMGroup = new System.Windows.Forms.GroupBox();
@@ -942,7 +942,7 @@
private System.Windows.Forms.ToolStripMenuItem CopyPatternToClipboardMenuItem;
private System.Windows.Forms.ToolStripMenuItem CopySpriteToClipboardMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
- private System.Windows.Forms.StatusStrip NesPPUStatusBar;
+ private StatusStripEx NesPPUStatusBar;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
private System.Windows.Forms.Timer Messagetimer;
private System.Windows.Forms.ToolStripMenuItem AlwaysOnTopMenuItem;
diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Designer.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Designer.cs
index 6d397b042d..f83434e2a5 100644
--- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Designer.cs
+++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Designer.cs
@@ -102,7 +102,7 @@ namespace BizHawk.Client.EmuHawk
this.TasView = new BizHawk.Client.EmuHawk.TasListView();
this.Frame = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.Log = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.TasStatusStrip = new System.Windows.Forms.StatusStrip();
+ this.TasStatusStrip = new StatusStripEx();
this.MessageStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.SplicerStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.TasPlaybackBox = new BizHawk.Client.EmuHawk.PlaybackBox();
@@ -839,7 +839,7 @@ namespace BizHawk.Client.EmuHawk
private System.Windows.Forms.ToolStripSeparator toolStripSeparator12;
private System.Windows.Forms.ToolStripMenuItem RestoreDefaultSettingsMenuItem;
private System.Windows.Forms.ToolStripMenuItem AutoloadProjectMenuItem;
- private System.Windows.Forms.StatusStrip TasStatusStrip;
+ private StatusStripEx TasStatusStrip;
private System.Windows.Forms.ToolStripStatusLabel MessageStatusLabel;
private PlaybackBox TasPlaybackBox;
private BookmarksBranchesBox TasBookmarksBranchesBox;
diff --git a/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.Designer.cs b/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.Designer.cs
index eafbb221f0..0a509a7b03 100644
--- a/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.Designer.cs
+++ b/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.Designer.cs
@@ -49,7 +49,7 @@
this.ShowChangeCountsContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ShowDiffContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ShowDomainContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.statusStrip1 = new System.Windows.Forms.StatusStrip();
+ this.statusStrip1 = new StatusStripEx();
this.MessageLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStrip1 = new ToolStripEx();
this.newToolStripButton = new System.Windows.Forms.ToolStripButton();
@@ -1067,7 +1067,7 @@
private System.Windows.Forms.ToolStripMenuItem ShowDomainContextMenuItem;
private System.Windows.Forms.ToolStripMenuItem AlwaysOnTopMenuItem;
private System.Windows.Forms.ToolStripMenuItem FloatingWindowMenuItem;
- private System.Windows.Forms.StatusStrip statusStrip1;
+ private StatusStripEx statusStrip1;
private System.Windows.Forms.ToolStripStatusLabel MessageLabel;
private System.Windows.Forms.ToolStripButton ErrorIconButton;
}