Permalink
Browse files

Fixed new key event handlers for the TextTool

  • Loading branch information...
1 parent 280cd33 commit d981b4639f539ccb59e40496e1fc7eb0e08cb9a3 @don-mccomb don-mccomb committed Dec 1, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 Pinta/MainWindow.cs
View
@@ -91,23 +91,25 @@ public MainWindow ()
PintaCore.Workspace.ActiveDocumentChanged += ActiveDocumentChanged;
}
+ [GLib.ConnectBefore]
void MainWindow_KeyPressEvent (object o, KeyPressEventArgs e)
{
// Give the Canvas (and by extension the tools)
// first shot at handling the event if
// the mouse pointer is on the canvas
- if (IsMouseOnCanvas())
+ if (IsMouseOnCanvas() || canvas_pad.Canvas.HasFocus)
{
canvas_pad.Canvas.DoKeyPressEvent (o, e);
}
}
+ [GLib.ConnectBefore]
void MainWindow_KeyReleaseEvent (object o, KeyReleaseEventArgs e)
{
// Give the Canvas (and by extension the tools)
// first shot at handling the event if
// the mouse pointer is on the canvas
- if (IsMouseOnCanvas())
+ if (IsMouseOnCanvas() || canvas_pad.Canvas.HasFocus)
{
canvas_pad.Canvas.DoKeyReleaseEvent (o, e);
}

0 comments on commit d981b46

Please sign in to comment.