=== modified file 'gui/DESIGN'
--- gui/DESIGN	2008-03-05 03:55:48 +0000
+++ gui/DESIGN	2009-01-26 03:50:19 +0000
@@ -19,7 +19,7 @@
 init(int argc, char **argv[]): 	
 This funtion is run first to initialize GUI-specific parameters/variables.
 
-createWindow(const char* title, int width, int height): 
+createWindow(const char* title, int width, int height, int xPosition, int yPosition, bool placeWindow): 
 Here we create a window-widget with calling parameters.
 
 setCursor(gnash_cursor_type newcursor):

=== modified file 'gui/NullGui.h'
--- gui/NullGui.h	2008-03-29 10:13:54 +0000
+++ gui/NullGui.h	2009-01-26 03:53:13 +0000
@@ -50,7 +50,8 @@
 		_timeout=to;
 	}
 	bool init(int, char ***) { return true; }
-	bool createWindow(const char* /*title*/, int /*width*/, int /*height*/)
+	bool createWindow(const char* /*title*/, int /*width*/, int /*height*/,
+	                  int /*yPosition*/, int /*xPosition*/, bool /*placeWindow*/)
 	{
 		return true;
 	}

=== modified file 'gui/Player.cpp'
--- gui/Player.cpp	2008-12-04 10:21:27 +0000
+++ gui/Player.cpp	2009-01-26 03:49:45 +0000
@@ -86,6 +86,9 @@
     _delay(0),
     _width(0),
     _height(0),
+    _xPosition(0),
+    _yPosition(0),
+    _placeWindow(false),
     _windowID(0),
     _doLoop(true),
     _doRender(true),
@@ -405,7 +408,7 @@
     _gui->setMovieDefinition(_movieDef.get());
 
     // Now that we know about movie size, create gui window.
-    _gui->createWindow(_url.c_str(), _width, _height);
+    _gui->createWindow(_url.c_str(), _width, _height, _xPosition, _yPosition, _placeWindow);
 
     SystemClock clock; // use system clock here...
     movie_root root(*_movieDef, clock, *_runInfo);

=== modified file 'gui/Player.h'
--- gui/Player.h	2008-11-04 01:14:26 +0000
+++ gui/Player.h	2009-01-26 03:46:59 +0000
@@ -101,6 +101,15 @@
 	void setHeight(size_t h) { _height = h; }
 	size_t getHeight() { return _height; }
 
+	void setXPostion(size_t xPos) { _xPosition = xPos; }
+	size_t getXPosition() { return _xPosition; }
+
+	void setYPosition(size_t yPos) { _yPosition = yPos; }
+	size_t getYPosition() { return _yPosition; }
+	
+	void setPlaceWindow(bool place) {_placeWindow = place; }
+	bool getPlaceWindow() { return _placeWindow; }
+	
 	void setWindowId(unsigned long x) { _windowID = x; }
 
 	void setDoLoop(bool b) { _doLoop = b; }
@@ -220,6 +229,12 @@
 
 	size_t _height;
 
+	size_t _xPosition;
+
+	size_t _yPosition;
+	
+	bool _placeWindow;
+
 	unsigned long _windowID;
 
 	bool _doLoop;

=== modified file 'gui/aqua.cpp'
--- gui/aqua.cpp	2008-11-21 15:15:25 +0000
+++ gui/aqua.cpp	2009-01-26 03:51:39 +0000
@@ -151,7 +151,8 @@
 }
 
 
-bool AquaGui::createWindow(const char* title, int width, int height)
+bool AquaGui::createWindow(const char* title, int width, int height,
+                           int xPosition, int yPosition, bool placeWindow)
 {
 	CFStringRef	windowTitle = NULL;
 	OSStatus	result;

=== modified file 'gui/aquasup.h'
--- gui/aquasup.h	2008-03-05 03:55:48 +0000
+++ gui/aquasup.h	2009-01-26 03:55:36 +0000
@@ -61,7 +61,8 @@
     virtual ~AquaGui();
     virtual bool init(int argc, char ***argv);
     virtual void setCursor(gnash_cursor_type newcursor);
-    virtual bool createWindow(const char* title, int width, int height);
+    virtual bool createWindow(const char *title, int width, int height,
+                              int xPosition = 0, int yPosition = 0, bool placeWindow = false);
     virtual bool run();
     virtual bool createMenu();
     virtual bool setupEvents();

=== modified file 'gui/fb.cpp'
--- gui/fb.cpp	2008-11-21 15:15:25 +0000
+++ gui/fb.cpp	2009-01-26 03:51:55 +0000
@@ -433,7 +433,8 @@
 #endif
 }
 
-bool FBGui::createWindow(const char* /*title*/, int /*width*/, int /*height*/)
+bool FBGui::createWindow(const char* /*title*/, int /*width*/, int /*height*/,
+                     int /*xPosition*/, int /*yPosition*/, bool /*placeWindow*/)
 {
   // Framebuffer has no windows... :-)
 

=== modified file 'gui/fbsup.h'
--- gui/fbsup.h	2008-04-07 20:44:55 +0000
+++ gui/fbsup.h	2009-01-26 03:55:54 +0000
@@ -193,7 +193,8 @@
 		FBGui(unsigned long xid, float scale, bool loop, unsigned int depth);
     virtual ~FBGui();
     virtual bool init(int argc, char ***argv);
-    virtual bool createWindow(const char* title, int width, int height);
+    virtual bool createWindow(const char *title, int width, int height,
+                              int xPosition = 0, int yPosition = 0, bool placeWindow = false);
     virtual bool run();
     virtual bool createMenu();
     virtual bool setupEvents();

=== modified file 'gui/fltk.cpp'
--- gui/fltk.cpp	2008-09-24 07:44:50 +0000
+++ gui/fltk.cpp	2009-01-26 03:51:34 +0000
@@ -228,7 +228,8 @@
 }
 
 bool
-FltkGui::createWindow(const char* title, int width, int height)
+FltkGui::createWindow(const char* title, int width, int height,
+                      int xPosition, int yPosition, bool placeWindow)
 {
     resize(width, _menu_height + height);
 

=== modified file 'gui/fltksup.h'
--- gui/fltksup.h	2008-01-21 20:55:39 +0000
+++ gui/fltksup.h	2009-01-26 03:56:35 +0000
@@ -48,7 +48,8 @@
 
     virtual void setInterval(unsigned int);
     virtual void setTimeout(unsigned int) { }
-    virtual bool createWindow(const char* title, int width, int height);
+    virtual bool createWindow(const char *title, int width, int height,
+                              int xPosition = 0, int yPosition = 0, bool placeWindow = false);
     virtual void renderBuffer();
 
     virtual bool run();

=== modified file 'gui/gnash.cpp'
--- gui/gnash.cpp	2008-12-28 09:40:28 +0000
+++ gui/gnash.cpp	2009-01-26 03:49:06 +0000
@@ -106,6 +106,8 @@
     << _("  -w,  --writelog          Produce the disk based debug log") << endl
     << _("  -j,  --width <width>     Set window width") << endl
     << _("  -k,  --height <height>   Set window height") << endl
+    << _("  -X,  --x-pos <x-pos>     Set window x position") << endl
+    << _("  -Y,  --y-pos <y-pos>     Set window y position") << endl
     << _("  -1,  --once              Exit when/if movie reaches the last frame") << endl
     << _("  -g,  --debugger          Turn on the SWF debugger") << endl
     << _("  -r,  --render-mode <0|1|2|3>") << endl
@@ -205,6 +207,8 @@
         { 'w', "writelog",      Arg_parser::no  },
         { 'j', "width",         Arg_parser::yes },
         { 'k', "height",        Arg_parser::yes },
+        { 'X', "x-postion",     Arg_parser::yes },
+        { 'Y', "y-postion",     Arg_parser::yes },
         { 'u', "real-url",      Arg_parser::yes },
         { 'P', "param",         Arg_parser::yes },
         { 'U', "base-url",      Arg_parser::yes },  
@@ -228,7 +232,7 @@
     bool renderflag = false;
     bool plugin = false;
     bool widthGiven = false, heightGiven = false;
-
+    bool xPosGiven = false, yPosGiven = false;
 
     for( int i = 0; i < parser.arguments(); ++i )
     {
@@ -328,6 +332,20 @@
                     gnash::log_debug(_("Setting height to %d"),
                             player.getHeight());
                     break;
+                case 'X':
+                    xPosGiven = true;
+                    player.setXPostion ( parser.argument<long>(i));
+                    player.setPlaceWindow( true );
+                    gnash::log_debug (_("Setting x position to %d"), 
+                            player.getXPosition());
+                    break;
+                case 'Y':
+                    yPosGiven = true;
+                    player.setYPosition ( parser.argument<long>(i));
+                    player.setPlaceWindow( true );
+                    gnash::log_debug (_("Setting x position to %d"), 
+                            player.getYPosition());
+                    break;
                 case 'x':
                     plugin = true;
                     player.setWindowId(parser.argument<long>(i));

=== modified file 'gui/gtk.cpp'
--- gui/gtk.cpp	2009-01-22 20:10:39 +0000
+++ gui/gtk.cpp	2009-01-26 03:49:15 +0000
@@ -628,12 +628,18 @@
 }
 
 bool
-GtkGui::createWindow(const char *title, int width, int height)
+GtkGui::createWindow(const char *title, int width, int height,
+                     int xPosition, int yPosition, bool placeWindow)
 {
 // First call the old createWindow function and then set the title.
 // In case there's some need to not setting the title.
     bool ret = createWindow(width, height);
     gtk_window_set_title(GTK_WINDOW(_window), title);
+    
+    // Move the window to correct posistion if requested by user.
+    if (placeWindow) {
+        gtk_window_move(GTK_WINDOW(_window), xPosition, yPosition);
+    }
 
     if (!_xid) {
     

=== modified file 'gui/gtksup.h'
--- gui/gtksup.h	2009-01-22 20:10:39 +0000
+++ gui/gtksup.h	2009-01-26 03:55:00 +0000
@@ -50,8 +50,8 @@
     virtual ~GtkGui();
     virtual bool init(int argc, char **argv[]);
     virtual bool createWindow(int width, int height);
-    virtual bool createWindow(const char *title, int width, int height);
-
+    virtual bool createWindow(const char *title, int width, int height,
+                              int xPosition = 0, int yPosition = 0, bool placeWindow = false);
     virtual bool run();
 
     void quit();

=== modified file 'gui/gui.h'
--- gui/gui.h	2009-01-22 20:10:39 +0000
+++ gui/gui.h	2009-01-26 03:51:59 +0000
@@ -110,8 +110,11 @@
      * @param title The window title.
      * @param width The desired window width in pixels.
      * @param height The desired window height in pixels.
+     * @param xPosition The desired window X position from the top left corner.
+     * @param yPosition The desired window Y position from the top left corner.
      */   
-    virtual bool createWindow(const char* title, int width, int height) = 0;
+    virtual bool createWindow(const char* title, int width, int height,
+                       int xPosition = 0, int yPosition = 0, bool placeWindow = false) = 0;
 
     /// Start main rendering loop.
     virtual bool run() = 0;

=== modified file 'gui/kde.cpp'
--- gui/kde.cpp	2008-11-14 22:39:17 +0000
+++ gui/kde.cpp	2009-01-26 03:49:54 +0000
@@ -79,11 +79,12 @@
 }
 
 bool
-KdeGui::createWindow(const char* windowtitle, int width, int height)
+KdeGui::createWindow(const char* windowtitle, int width, int height,
+                     int xPosition, int yPosition, bool placeWindow)
 {
 //    GNASH_REPORT_FUNCTION;
 
-    _qwidget->setGeometry(0, 0, width, height);
+    _qwidget->setGeometry(xPosition, yPosition, width, height);
     _qwidget->setCaption(windowtitle);
 
     _qapp->setMainWidget(_qwidget.get());

=== modified file 'gui/kdesup.h'
--- gui/kdesup.h	2008-03-29 10:13:54 +0000
+++ gui/kdesup.h	2009-01-26 03:54:43 +0000
@@ -91,7 +91,8 @@
     KdeGui(unsigned long xid, float scale, bool loop, unsigned int depth);
     virtual ~KdeGui();
     virtual bool init(int argc, char **argv[]);
-    virtual bool createWindow(const char* windowtitle, int width, int height);
+    virtual bool createWindow(const char* windowtitle, int width, int height,
+                              int xPosition = 0, int yPosition = 0, bool placeWindow = false);
     virtual bool run();
     virtual bool createMenu();
     virtual bool setupEvents();

=== modified file 'gui/sdl.cpp'
--- gui/sdl.cpp	2008-11-21 15:15:25 +0000
+++ gui/sdl.cpp	2009-01-26 03:51:31 +0000
@@ -191,7 +191,8 @@
 
 
 bool
-SDLGui::createWindow(const char *title, int width, int height)
+SDLGui::createWindow(const char *title, int width, int height,
+                     int xPosition, int yPosition, bool placeWindow)
 {
     GNASH_REPORT_FUNCTION;
     _width = width;

=== modified file 'gui/sdlsup.h'
--- gui/sdlsup.h	2008-03-29 10:13:54 +0000
+++ gui/sdlsup.h	2009-01-26 03:56:54 +0000
@@ -50,7 +50,8 @@
     SDLGui(unsigned long xid, float scale, bool loop, unsigned int depth);
     virtual ~SDLGui();
     virtual bool init(int argc, char **argv[]);
-    virtual bool createWindow(const char *title, int width, int height);
+    virtual bool createWindow(const char *title, int width, int height,
+                              int xPosition = 0, int yPosition = 0, bool placeWindow = false);
     virtual bool run();
     virtual bool createMenu();
     virtual bool setupEvents();

