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
This commit is contained in:
Przemyslaw Czerpak
2009-10-28 08:13:41 +00:00
parent 33b8f7bd83
commit bdd496a088
3 changed files with 28 additions and 4 deletions

View File

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

View File

@@ -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 );

View File

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