Re: Application windows title in X windows

Anders Reggestad <[email protected]>
Newsgroups gmane.comp.graphics.crystalspace.devel
Message-ID <CAMhTDXA6y6Qkaw6uCEktNZM=zbi=mxfpbefiDjHgT5HCw-xZ4A@mail.gmail.com>
The CS xwin object is created, though the the actual X windows was in my
case created by the csInitializer::OpenApplication. Somewhere in that code
the SetTitle is called with the win_title from the csGraphics2DGLX. This
caused a problem for the ubuntu window manager to identify the application
upon startup, making integration with the ubuntu launcher a bit difficult.
In the PS code we used to call SetTitle after OpenApplication to make sure
we got our title not the "Crystal Space Application" title, but than the
application wha identified as unkown on the launcher. Tested your code and
it seams to work ok. Thanks.

2012/7/25 Eric Sunshine <[email protected]>

> 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/

_______________________________________________
Crystal-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-develop
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.