diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c79dbae04f..0c7bc48e2a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,14 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-10-28 09:13 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/rtl/gtxwc/gtxwc.c + * use XSetWMName() instead of XStoreName() to set window title + using UTF8 strings + + * harbour/include/hbapigt.h + * always declare hb_gtIsGtRef() for C++ compiler + 2009-10-27 19:49 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/codepage/cpru866.c * harbour/src/codepage/cpruiso.c diff --git a/harbour/include/hbapigt.h b/harbour/include/hbapigt.h index a397aa1de4..e1d502d4aa 100644 --- a/harbour/include/hbapigt.h +++ b/harbour/include/hbapigt.h @@ -153,9 +153,7 @@ typedef struct /* Public interface. These should never change, only be added to. */ -#ifdef _HB_API_INTERNAL_ - extern void hb_gtIsGtRef( void ); -#endif +extern void hb_gtIsGtRef( void ); extern HB_EXPORT void hb_gtStartupInit( void ); extern HB_EXPORT void * hb_gtAlloc( void * hGT ); diff --git a/harbour/src/rtl/gtxwc/gtxwc.c b/harbour/src/rtl/gtxwc/gtxwc.c index b5c8dcff3c..155197b8ba 100644 --- a/harbour/src/rtl/gtxwc/gtxwc.c +++ b/harbour/src/rtl/gtxwc/gtxwc.c @@ -2959,10 +2959,28 @@ static void hb_gt_xwc_ProcessMessages( PXWND_DEF wnd ) HB_XWC_XLIB_LOCK hb_gt_xwc_UpdateChr( wnd ); + if( wnd->fDspTitle ) { wnd->fDspTitle = FALSE; - XStoreName( wnd->dpy, wnd->window, wnd->szTitle ? wnd->szTitle : "" ); + if( wnd->szTitle ) + { + XTextProperty text; + char * pBuffer; + ULONG ulLen; + + ulLen = hb_cdpStringInUTF8Length( wnd->hostCDP, FALSE, wnd->szTitle, strlen( wnd->szTitle ) ); + pBuffer = ( char * ) hb_xgrab( ulLen + 1 ); + hb_cdpStrnToUTF8( wnd->hostCDP, FALSE, wnd->szTitle, strlen( wnd->szTitle ), pBuffer ); + text.value = ( unsigned char * ) pBuffer; + text.encoding = s_atomUTF8String; + text.format = 8; + text.nitems = strlen( pBuffer ); + XSetWMName( wnd->dpy, wnd->window, &text ); + hb_xfree( pBuffer ); + } + else + XStoreName( wnd->dpy, wnd->window, "" ); } #if 1