From 49b6910940976e09997f7b5812658c726f9b0e88 Mon Sep 17 00:00:00 2001
From: Alexander Lang <langal@cip.ifi.lmu.de>
Date: Thu, 15 Nov 2012 19:10:25 +0100
Subject: [PATCH] Added resize() to ClusterWindow()

---
 Source/System/Cluster/Window/Base/OSGClusterWindow.cpp | 16 ++++++++++++++++
 Source/System/Cluster/Window/Base/OSGClusterWindow.h   |  4 ++++
 2 files changed, 20 insertions(+)

diff --git a/Source/System/Cluster/Window/Base/OSGClusterWindow.cpp b/Source/System/Cluster/Window/Base/OSGClusterWindow.cpp
index 9ee1df9..26da48a 100644
--- a/Source/System/Cluster/Window/Base/OSGClusterWindow.cpp
+++ b/Source/System/Cluster/Window/Base/OSGClusterWindow.cpp
@@ -582,6 +582,15 @@ void ClusterWindow::render(RenderActionBase *action)
         _statistics->getElem(statFrameExitTime)->stop();  
 }
 
+void ClusterWindow::resize(int width, int height)
+{
+	Window::resize(width, height);
+    if(getNetwork()->getMainConnection() && getNetwork()->getAspect())
+    {
+        clientResize(width, height);
+    }	
+}
+
 void ClusterWindow::activate(void)
 {
     this->doActivate();
@@ -780,6 +789,13 @@ void ClusterWindow::clientSwap( void )
 #endif
 }
 
+void ClusterWindow::clientResize(int width, int height)
+{
+	if(getClientWindow() != NULL)
+	{
+		getClientWindow()->resize(width, height);
+	}
+}
 /*-------------------------------------------------------------------------*/
 /*                         server methods                                  */
 
diff --git a/Source/System/Cluster/Window/Base/OSGClusterWindow.h b/Source/System/Cluster/Window/Base/OSGClusterWindow.h
index b79585e..6c3f429 100644
--- a/Source/System/Cluster/Window/Base/OSGClusterWindow.h
+++ b/Source/System/Cluster/Window/Base/OSGClusterWindow.h
@@ -104,6 +104,8 @@ class OSG_CLUSTER_DLLMAPPING ClusterWindow : public ClusterWindowBase
     virtual void  init(GLInitFunctor oFunc = GLInitFunctor());
 
     virtual void  render            (RenderActionBase *action);
+	virtual void  resize(int width,
+                         int height);  
 
     /*! \}                                                                 */
     /*---------------------------------------------------------------------*/
@@ -185,6 +187,8 @@ class OSG_CLUSTER_DLLMAPPING ClusterWindow : public ClusterWindowBase
 
     virtual void clientRender (RenderActionBase *action);
     virtual void clientSwap   (void                    );
+	virtual void clientResize (int width,
+	                           int height              );
 
     /*! \}                                                                 */
     /*---------------------------------------------------------------------*/
-- 
1.7.11.msysgit.1

