Author: everaldo
Date: 2007-06-25 16:00:57 -0400 (Mon, 25 Jun 2007)
New Revision: 80726

Modified:
   trunk/moon/gtk/ChangeLog
   trunk/moon/gtk/mopen.cs
Log:
        * mopen.cs: Fix mopen crash when canvas size is not specified. We should
        have a better stuff for this, just get it working right now.

2007-06-25  Everaldo Canuto  <[EMAIL PROTECTED]>



Modified: trunk/moon/gtk/ChangeLog
===================================================================
--- trunk/moon/gtk/ChangeLog    2007-06-25 19:53:14 UTC (rev 80725)
+++ trunk/moon/gtk/ChangeLog    2007-06-25 20:00:57 UTC (rev 80726)
@@ -1,5 +1,10 @@
 2007-06-25  Everaldo Canuto  <[EMAIL PROTECTED]>
 
+       * mopen.cs: Fix mopen crash when canvas size is not specified. We should
+       have a better stuff for this, just get it working right now.
+
+2007-06-25  Everaldo Canuto  <[EMAIL PROTECTED]>
+
        * mopen.cs: Use cavas size for silver and window size.
 
 2007-06-25  Everaldo Canuto  <[EMAIL PROTECTED]>

Modified: trunk/moon/gtk/mopen.cs
===================================================================
--- trunk/moon/gtk/mopen.cs     2007-06-25 19:53:14 UTC (rev 80725)
+++ trunk/moon/gtk/mopen.cs     2007-06-25 20:00:57 UTC (rev 80726)
@@ -81,6 +81,18 @@
                 ctx.Fill ();
        }
 
+       [GLib.ConnectBefore]
+       static void HandleMousePressEvent (object sender, ExposeEventArgs 
expose_args)
+       {
+                Widget w = (Widget)sender;
+           
+                Cairo.Context ctx = CompositeHelper.Create (w.GdkWindow);
+                ctx.Operator = Cairo.Operator.Source;
+                ctx.Color = new Cairo.Color (1.0, 1.0, 1.0, 0.0);
+                CompositeHelper.Region (ctx, expose_args.Event.Region);
+                ctx.Fill ();
+       }
+
        static void ConfigureDeskletWindow (Gtk.Window window)
        {
                window.Decorated = false;
@@ -145,6 +157,8 @@
                } else if (canvas.Width > 0 && canvas.Height > 0) {
                        w.Resize ((int) canvas.Width, (int) canvas.Height);
                        silver = new GtkSilver ((int) canvas.Width, (int) 
canvas.Height);
+               } else {
+                       silver = new GtkSilver (400, 400);
                }
 
                w.Add (silver);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to