From 8fab7b14aa66915f6f3d0cad95c1dce933d3f063 Mon Sep 17 00:00:00 2001 From: Lluis Sanchez Gual Date: Thu, 9 Jan 2014 19:26:37 +0100 Subject: [GTK] Canvas issue drawing fix Adjust the drawing origin only when the canvas is not using its own GdkWindow. --- Xwt.Gtk/Xwt.GtkBackend/CanvasBackend.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Xwt.Gtk') diff --git a/Xwt.Gtk/Xwt.GtkBackend/CanvasBackend.cs b/Xwt.Gtk/Xwt.GtkBackend/CanvasBackend.cs index 2fd51a6b..29753f24 100644 --- a/Xwt.Gtk/Xwt.GtkBackend/CanvasBackend.cs +++ b/Xwt.Gtk/Xwt.GtkBackend/CanvasBackend.cs @@ -186,12 +186,12 @@ namespace Xwt.GtkBackend } else { ctx.Context = Gdk.CairoHelper.Create (GdkWindow); } - if (!VisibleWindow) + if (!VisibleWindow) { ctx.Context.Translate (Allocation.X, Allocation.Y); - - // Set ContextBackend Origin - ctx.Origin.X = Allocation.X; - ctx.Origin.Y = Allocation.Y; + // Set ContextBackend Origin + ctx.Origin.X = Allocation.X; + ctx.Origin.Y = Allocation.Y; + } return ctx; } } -- cgit v1.2.3