diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d8a92ceedb..e72992109a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,14 @@ The license applies to all entries newer than 2009-04-28. */ +2011-11-10 10:34 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/rtl/gtxwc/gtxwc.c + ! create initial console window in fullscreen mode if user called + hb_gtInfo( HB_GTI_ISFULLSCREEN, .T. ) + before window was created + * harbour/tests/gtkeys.prg + * modified to optionally test different CPs some extended GT keys + 2011-11-09 17:17 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/rtl/gtxwc/gtxwc.c * return HB_GTI_RESIZEMODE_ROWS for HB_GTI_RESIZEMODE diff --git a/harbour/src/rtl/gtxwc/gtxwc.c b/harbour/src/rtl/gtxwc/gtxwc.c index 3a1925f94a..e0a03f91e0 100644 --- a/harbour/src/rtl/gtxwc/gtxwc.c +++ b/harbour/src/rtl/gtxwc/gtxwc.c @@ -4458,12 +4458,15 @@ static void hb_gt_xwc_CreateWindow( PXWND_DEF wnd ) /* wnd->fWinResize = HB_TRUE; */ hb_gt_xwc_Resize( wnd, wnd->cols, wnd->rows ); - XMapWindow( wnd->dpy, wnd->window ); /* ok, now we can inform the X manager about our new status: */ hb_gt_xwc_SetResizing( wnd ); + /* enable FullScreen mode if set by user */ + if( wnd->fFullScreen ) + hb_gt_xwc_FullScreen( wnd ); + /* Request WM to deliver destroy event */ XSetWMProtocols( wnd->dpy, wnd->window, &s_atomDelWin, 1 ); diff --git a/harbour/tests/gtkeys.prg b/harbour/tests/gtkeys.prg index bfa6d245ae..75c0a2aaad 100644 --- a/harbour/tests/gtkeys.prg +++ b/harbour/tests/gtkeys.prg @@ -14,9 +14,14 @@ #include "inkey.ch" #ifdef __HARBOUR__ #include "hbgtinfo.ch" + +REQUEST HB_CODEPAGE_PLMAZ +REQUEST HB_CODEPAGE_PLISO +REQUEST HB_CODEPAGE_PL852 +REQUEST HB_CODEPAGE_PLWIN #endif -function main() +function main( cTermCP, cHostCP, lBoxChar ) local k, i, s local aKeys := { ; { "K_UP", 5, "Up arrow, Ctrl-E" }, ; @@ -214,26 +219,47 @@ aadd(aKeys, { "HB_K_LOSTFOCUS", 1104, "focus lost" } ) aadd(aKeys, { "HB_K_CONNECT", 1105, "remote terminal connected" } ) aadd(aKeys, { "HB_K_DISCONNECT", 1106, "remote terminal disconnected" } ) -? os(), version(), date(), time() + +#ifdef __HARBOUR__ + set( _SET_EVENTMASK, hb_bitOR( INKEY_ALL, HB_INKEY_GTEVENT ) ) + //hb_gtInfo( HB_GTI_RESIZABLE, .f. ) + //hb_gtInfo( HB_GTI_RESIZEMODE, HB_GTI_RESIZEMODE_ROWS ) + //hb_gtInfo( HB_GTI_RESIZEMODE, HB_GTI_RESIZEMODE_FONT ) + hb_gtInfo( HB_GTI_ISFULLSCREEN, .T. ) + hb_gtInfo( HB_GTI_ALTENTER, .T. ) + hb_gtInfo( HB_GTI_CLOSABLE, .f. ) + hb_gtInfo( HB_GTI_ESCDELAY, 50 ) + if empty( cTermCP ) + cTermCP := "PLISO" + else + cTermCP := upper( cTermCP ) + endif + if empty( cHostCP ) + cHostCP := "PLMAZ" + else + cHostCP := upper( cHostCP ) + endif + lBoxChar := !empty( lBoxChar ) + hb_cdpSelect( cHostCP ) + hb_setTermCP( cTermCP, cHostCP, lBoxChar ) +#else + #ifdef INKEY_ALL + set( _SET_EVENTMASK, INKEY_ALL ) + #endif +#endif mdblclk(250) setcancel(.f.) //altd(0) +? os(), version(), date(), time() #ifdef __HARBOUR__ - set( _SET_EVENTMASK, hb_bitOR( INKEY_ALL, HB_INKEY_GTEVENT ) ) - hb_gtInfo(HB_GTI_ESCDELAY,50) - hb_cdpSelect( "PLMAZ" ) - hb_setTermCP( "PLISO" ) ? hb_gtVersion(1), hb_gtVersion() -#else - #ifdef INKEY_ALL - set(_SET_EVENTMASK,INKEY_ALL) - #endif + ? "Host codpage: " + hb_cdpSelect() + ", terminal codepage: " + cTermCP #endif - ? "@ - interrupt, keycodes checking: " ? + while (.t.) k:=inkey(0) if (i:=ascan(aKeys, { |x| x[2]==k }))!=0