Small fix

if form isn't in focus then don't send key data
This commit is contained in:
d3agle 2015-07-29 08:38:50 -05:00
parent 6f307b210b
commit 45742d234d
1 changed files with 1 additions and 1 deletions

View File

@ -284,7 +284,7 @@ namespace xServer.Forms
private void OnKeyDown(object sender, KeyEventArgs e)
{
if (picDesktop.Image != null && !btnStart.Enabled)
if (picDesktop.Image != null && !btnStart.Enabled && this.ContainsFocus)
{
if (_connectClient != null)
new Core.Packets.ServerPackets.DoKeyboardEvent((byte)e.KeyCode).Execute(_connectClient);