gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ./ChangeLog backend/gnash.cpp backend/gtk...


From: Rob Savoye
Subject: [Gnash-commit] gnash ./ChangeLog backend/gnash.cpp backend/gtk...
Date: Thu, 06 Apr 2006 15:09:30 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Branch:         
Changes by:     Rob Savoye <address@hidden>     06/04/06 15:09:30

Modified files:
        .              : ChangeLog 
        backend        : gnash.cpp gtksup.cpp 

Log message:
        * backend/gnash.cpp: Make width and height global variables.
        * backend/gtksup.cpp: Reset the width and height global variables
        when we get a configure event, as the window has been resized.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/ChangeLog.diff?tr1=1.204&tr2=1.205&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/backend/gnash.cpp.diff?tr1=1.22&tr2=1.23&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/backend/gtksup.cpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: gnash/ChangeLog
diff -u gnash/ChangeLog:1.204 gnash/ChangeLog:1.205
--- gnash/ChangeLog:1.204       Wed Apr  5 15:50:27 2006
+++ gnash/ChangeLog     Thu Apr  6 15:09:30 2006
@@ -1,3 +1,9 @@
+2006-04-06  Rob Savoye  <address@hidden>
+       
+       * backend/gnash.cpp: Make width and height global variables.
+       * backend/gtksup.cpp: Reset the width and height global variables
+       when we get a configure event, as the window has been resized.
+
 2006-04-05  Rob Savoye  <address@hidden>
 
        * configure.ac: Fix --disable-xml option.
Index: gnash/backend/gnash.cpp
diff -u gnash/backend/gnash.cpp:1.22 gnash/backend/gnash.cpp:1.23
--- gnash/backend/gnash.cpp:1.22        Wed Apr  5 04:15:34 2006
+++ gnash/backend/gnash.cpp     Thu Apr  6 15:09:30 2006
@@ -117,6 +117,9 @@
 extern int mouse_y;
 extern int mouse_buttons;
 
+extern int width;
+extern int height;
+
 // Define is you just want a hard coded OpenGL graphic
 //#define TEST_GRAPHIC
 
@@ -240,8 +243,6 @@
     bool sdl_abort = true;
     int  delay = 31;
     float      tex_lod_bias;
-    int        width = 0;
-    int        height = 0;
 #ifndef HAVE_GTK2
     int windowid = 0;
 #else
Index: gnash/backend/gtksup.cpp
diff -u gnash/backend/gtksup.cpp:1.1 gnash/backend/gtksup.cpp:1.2
--- gnash/backend/gtksup.cpp:1.1        Wed Mar 29 05:42:42 2006
+++ gnash/backend/gtksup.cpp    Thu Apr  6 15:09:30 2006
@@ -60,6 +60,8 @@
 int mouse_x = 0;
 int mouse_y = 0;
 int mouse_buttons = 0;
+int width = 0;
+int height = 0;
 
 #if defined(USE_GTKGLEXT) && defined(HAVE_GTK2)
 movie_state_e movie_menu_state;
@@ -365,7 +367,12 @@
     // OpenGL END
 #else
     if (gdk_gl_drawable_make_current(gldrawable, glcontext)) {
-//        viewer.resize(widget->allocation.width, widget->allocation.height);
+        glViewport (event->x, event->y, event->width, event->height);
+        // Reset the size of the frame. This is really ugly but these
+        // global variables are used by the existing main event loop
+        // in gnash.cpp to set the size of the rendered image.
+        width = event->width;
+        height = event->height;
     }
  
 // end of TEST_GRAPHIC




reply via email to

[Prev in Thread] Current Thread [Next in Thread]