Author: fejj
Date: 2007-12-10 14:20:24 -0500 (Mon, 10 Dec 2007)
New Revision: 91057

Modified:
   trunk/moon/src/ChangeLog
   trunk/moon/src/collection.h
   trunk/moon/src/runtime.cpp
Log:
2007-12-10  Jeffrey Stedfast  <[EMAIL PROTECTED]>

        * runtime.cpp (InitializeDrawingArea): Removed the call to
        gtk_widget_set_size_request() - we now call it elsewhere (since
        going fullscreen requiers us to call set_size_request() /before/
        calling gtk_window_fullscreen(). When going to fullscreen mode,
        this was causing the FullScreenMessage item to appear in the
        upper-left corner rather than centered like it should have been.
        (Surface): Make the call to gtk_widget_set_size_request() here now
        that it no longer is called inside InitializeDrawingArea().



Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2007-12-10 17:50:21 UTC (rev 91056)
+++ trunk/moon/src/ChangeLog    2007-12-10 19:20:24 UTC (rev 91057)
@@ -1,3 +1,14 @@
+2007-12-10  Jeffrey Stedfast  <[EMAIL PROTECTED]>
+
+       * runtime.cpp (InitializeDrawingArea): Removed the call to
+       gtk_widget_set_size_request() - we now call it elsewhere (since
+       going fullscreen requiers us to call set_size_request() /before/
+       calling gtk_window_fullscreen(). When going to fullscreen mode,
+       this was causing the FullScreenMessage item to appear in the
+       upper-left corner rather than centered like it should have been.
+       (Surface): Make the call to gtk_widget_set_size_request() here now
+       that it no longer is called inside InitializeDrawingArea().
+
 2007-12-07  Sebastien Pouliot  <[EMAIL PROTECTED]> 
 
        * geometry.cpp: Set SHAPE_EMPTY if only Height or Width is specified.
@@ -15,8 +26,8 @@
 
 2007-12-07  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
 
-       * animation.cpp, geometry.cpp: Fix a couple of memory leaks, detected 
by the
-         javascript tests.
+       * animation.cpp, geometry.cpp: Fix a couple of memory leaks,
+         detected by the javascript tests.
 
 2007-12-06  Jeffrey Stedfast  <[EMAIL PROTECTED]>
 

Modified: trunk/moon/src/collection.h
===================================================================
--- trunk/moon/src/collection.h 2007-12-10 17:50:21 UTC (rev 91056)
+++ trunk/moon/src/collection.h 2007-12-10 19:20:24 UTC (rev 91057)
@@ -60,7 +60,7 @@
 
 class CollectionIterator {
  public:
-       CollectionIterator (Collection *c){
+       CollectionIterator (Collection *c) {
                first = true;
                collection = c;
                current = c->list->First ();

Modified: trunk/moon/src/runtime.cpp
===================================================================
--- trunk/moon/src/runtime.cpp  2007-12-10 17:50:21 UTC (rev 91056)
+++ trunk/moon/src/runtime.cpp  2007-12-10 19:20:24 UTC (rev 91057)
@@ -162,9 +162,11 @@
        drawing_area = gtk_event_box_new ();
 
        background_color = new Color (1, 1, 1, 0);
-
+       
+       gtk_widget_set_size_request (drawing_area, width, height);
+       
        InitializeDrawingArea (drawing_area);
-
+       
        buffer = NULL;
 
        normal_width = width;
@@ -636,11 +638,11 @@
                width = screen_width;
                height = screen_height;
                
-               gtk_widget_set_size_request (drawing_area, screen_width, 
screen_height);
+               gtk_widget_set_size_request (drawing_area, width, height);
                gtk_window_fullscreen (GTK_WINDOW (drawing_area));
                
                InitializeDrawingArea (drawing_area);
-       
+               
                ShowFullScreenMessage ();
                
                ConnectEvents (false);
@@ -651,7 +653,7 @@
                drawing_area = drawing_area_normal;
 
                // Destroy the fullscreen widget.
-               GtkWidget * fs = drawing_area_fullscreen;
+               GtkWidget *fs = drawing_area_fullscreen;
                drawing_area_fullscreen = NULL;
                DestroyDrawingArea (fs);
                
@@ -668,7 +670,7 @@
 }
 
 void 
-Surface::DestroyDrawingArea (GtkWidget* drawing_area)
+Surface::DestroyDrawingArea (GtkWidget *drawing_area)
 {
        if (drawing_area) {
                g_signal_handlers_disconnect_matched (drawing_area,
@@ -679,24 +681,24 @@
 }
 
 void
-Surface::InitializeDrawingArea (GtkWidget* drawing_area)
+Surface::InitializeDrawingArea (GtkWidget *drawing_area)
 {
        // don't let gtk clear the window we'll do all the drawing.
        //gtk_widget_set_app_paintable (drawing_area, TRUE);
        gtk_widget_set_double_buffered (drawing_area, FALSE);
+       
        //
        // Set to true, need to change that to FALSE later when we start
        // repainting again.   
        //
-       if (GTK_IS_EVENT_BOX (drawing_area)) {
+       if (GTK_IS_EVENT_BOX (drawing_area))
                gtk_event_box_set_visible_window (GTK_EVENT_BOX (drawing_area), 
FALSE);
-       }
-
-       gtk_signal_connect (GTK_OBJECT (drawing_area), "size_allocate",
-                           G_CALLBACK(drawing_area_size_allocate), this);
-       gtk_signal_connect (GTK_OBJECT (drawing_area), "destroy",
-                           G_CALLBACK(drawing_area_destroyed), this);
-
+       
+       g_signal_connect (G_OBJECT (drawing_area), "size-allocate",
+                         G_CALLBACK (drawing_area_size_allocate), this);
+       g_signal_connect (G_OBJECT (drawing_area), "destroy",
+                         G_CALLBACK (drawing_area_destroyed), this);
+       
        gtk_widget_add_events (drawing_area, 
                               GDK_POINTER_MOTION_MASK |
                               GDK_POINTER_MOTION_HINT_MASK |
@@ -707,8 +709,6 @@
        GTK_WIDGET_SET_FLAGS (drawing_area, GTK_CAN_FOCUS);
 
        gtk_widget_show (drawing_area);
-
-       gtk_widget_set_size_request (drawing_area, width, height);
 }
 
 void
@@ -726,7 +726,7 @@
        
        nframes++;
        
-       if ((now = get_now ()) > (start + TIMESPANTICKS_IN_SECOND)) {
+       if (false && (now = get_now ()) > (start + TIMESPANTICKS_IN_SECOND)) {
                printf ("Rendered %d frames in %.3fs = %.3f FPS\n", nframes,
                        (now - start) / TIMESPANTICKS_IN_SECOND_FLOAT,
                        nframes / ((now - start) / 
TIMESPANTICKS_IN_SECOND_FLOAT));

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

Reply via email to