Browse Source

Handle input again.

pull/10/head
Steven Kirk 12 years ago
parent
commit
2588c052b3
  1. 7
      Perspex.Controls/Window.cs

7
Perspex.Controls/Window.cs

@ -9,6 +9,7 @@ namespace Perspex.Controls
using System; using System;
using System.Reactive.Linq; using System.Reactive.Linq;
using Perspex.Input; using Perspex.Input;
using Perspex.Input.Raw;
using Perspex.Layout; using Perspex.Layout;
using Perspex.Media; using Perspex.Media;
using Perspex.Platform; using Perspex.Platform;
@ -64,6 +65,7 @@ namespace Perspex.Controls
this.impl.SetOwner(this); this.impl.SetOwner(this);
this.impl.Activated += this.HandleActivated; this.impl.Activated += this.HandleActivated;
this.impl.Closed += this.HandleClosed; this.impl.Closed += this.HandleClosed;
this.impl.Input += this.HandleInput;
Size clientSize = this.ClientSize = this.impl.ClientSize; Size clientSize = this.ClientSize = this.impl.ClientSize;
this.dispatcher = Dispatcher.UIThread; this.dispatcher = Dispatcher.UIThread;
@ -127,6 +129,11 @@ namespace Perspex.Controls
} }
} }
private void HandleInput(object sender, RawInputEventArgs e)
{
this.inputManager.Process(e);
}
private void HandleLayoutNeeded() private void HandleLayoutNeeded()
{ {
this.dispatcher.InvokeAsync(this.LayoutPass, DispatcherPriority.Render); this.dispatcher.InvokeAsync(this.LayoutPass, DispatcherPriority.Render);

Loading…
Cancel
Save