Re: Application windows title in X windows

Eric Sunshine <[email protected]>
Newsgroups gmane.comp.graphics.crystalspace.devel
Message-ID <CAPig+cTKQcAPitp=QPJPWcSpqOsmYtFmY3EnRFm+CvgK3oxQXQ@mail.gmail.com>
Thanks for the report. I applied the following patch instead. It's
surprising, though, that SetTitle() didn't crash for you if the 'xwin'
variable was not yet assigned. Do you have any insight regarding this?

index 68d953f..31707d2 100644
--- a/plugins/video/canvas/openglx/glx2d.h
+++ b/plugins/video/canvas/openglx/glx2d.h
@@ -95,7 +95,10 @@ public:
   }

   virtual void SetTitle (const char* title)
-  { xwin->SetTitle (title); }
+  {
+    csGraphics2DGLCommon::SetTitle (title);
+    xwin->SetTitle (title);
+  }

   /** Sets the icon of this window with the provided one.
    *

-- ES


On Wed, Jul 25, 2012 at 5:25 AM, Anders Reggestad
<[email protected]> wrote:
> Hi,
>
> When calling the iNativeWindow->SetTitle before the window is mapped CS will
> change the value back to the default "Crystal Space Application" text due to
> the win_title member variable of the csGraphics2DGLX that isn't updated when
> SetTitle is called. The win_title of csGraphics2DGLX is passed to the
> xwin->SetTitle when the window is opened.
> Following is a patch for this problem. Hope someone can submit this fix.
>
> Index: plugins/video/canvas/openglx/glx2d.h
> ===================================================================
> --- plugins/video/canvas/openglx/glx2d.h    (revision 38538)
> +++ plugins/video/canvas/openglx/glx2d.h    (working copy)
> @@ -95,7 +95,7 @@
>    }
>
>    virtual void SetTitle (const char* title)
> -  { xwin->SetTitle (title); }
> +  { win_title = title; xwin->SetTitle (title); }
>
>    /** Sets the icon of this window with the provided one.
>     *
>
> -Magodra
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Crystal-develop mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/crystal-develop
>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.