2014-09-23 11:41 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/gtqtc/gtqtc1.cpp
* src/rtl/gtwvt/gtwvt.c
* contrib/gtwvg/gtwvgd.c
* use hb_vmRequestQuit() instead of hb_vmRequestCancel() when
close event is received - it is GTXWC compatible behavior and
allows to execute user EXIT PROCEDUREs.
Please also remember that all ALWAYS sections are executed too
regardles of requested event (QUIT, BREAK, CANCEL)
* src/rtl/gtwvt/gtwvt.c
! fixed processing WM_QUERYENDSESSION and WM_ENDSESSION messages.
Now GTWVT applications do not interrupt system shutdown process
and do not close application if other process interrupted it.
In the future we can also add support for blocking system shutdown
operation, i.e. using HB_GTI_CLOSEMODE as bitfield, anyhow before
we begin to change it we should agree final version.
! applied Rolf's patch which fixes circle and ellipse cords.
I haven't tested it and I hope that they were verified visually
on the screen - some of Windows GUI functions do not access
border points.
This commit is contained in:
@@ -10,6 +10,28 @@
|
||||
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
|
||||
*/
|
||||
|
||||
2014-09-23 11:41 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* contrib/gtqtc/gtqtc1.cpp
|
||||
* src/rtl/gtwvt/gtwvt.c
|
||||
* contrib/gtwvg/gtwvgd.c
|
||||
* use hb_vmRequestQuit() instead of hb_vmRequestCancel() when
|
||||
close event is received - it is GTXWC compatible behavior and
|
||||
allows to execute user EXIT PROCEDUREs.
|
||||
Please also remember that all ALWAYS sections are executed too
|
||||
regardles of requested event (QUIT, BREAK, CANCEL)
|
||||
|
||||
* src/rtl/gtwvt/gtwvt.c
|
||||
! fixed processing WM_QUERYENDSESSION and WM_ENDSESSION messages.
|
||||
Now GTWVT applications do not interrupt system shutdown process
|
||||
and do not close application if other process interrupted it.
|
||||
In the future we can also add support for blocking system shutdown
|
||||
operation, i.e. using HB_GTI_CLOSEMODE as bitfield, anyhow before
|
||||
we begin to change it we should agree final version.
|
||||
! applied Rolf's patch which fixes circle and ellipse cords.
|
||||
I haven't tested it and I hope that they were verified visually
|
||||
on the screen - some of Windows GUI functions do not access
|
||||
border points.
|
||||
|
||||
2014-09-23 10:47 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* contrib/rddsql/sqlbase.c
|
||||
! set maximum field size to HB_SYMBOL_NAME_LEN
|
||||
|
||||
@@ -3482,12 +3482,7 @@ QTCWindow::~QTCWindow( void )
|
||||
void QTCWindow::closeEvent( QCloseEvent * event )
|
||||
{
|
||||
if( qConsole->pQTC->iCloseMode == 0 )
|
||||
{
|
||||
PHB_ITEM pItem = hb_itemPutL( NULL, HB_TRUE );
|
||||
hb_setSetItem( HB_SET_CANCEL, pItem );
|
||||
hb_itemRelease( pItem );
|
||||
hb_vmRequestCancel();
|
||||
}
|
||||
hb_vmRequestQuit();
|
||||
else
|
||||
hb_gt_qtc_addKeyToInputQueue( qConsole->pQTC, HB_K_CLOSE );
|
||||
|
||||
|
||||
@@ -2174,10 +2174,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
|
||||
#if 1
|
||||
hb_gt_wvt_AddCharToInputQueue( pWVT, HB_K_CLOSE );
|
||||
#else
|
||||
PHB_ITEM pItem = hb_itemPutL( NULL, HB_TRUE );
|
||||
hb_setSetItem( HB_SET_CANCEL, pItem );
|
||||
hb_itemRelease( pItem );
|
||||
hb_vmRequestCancel();
|
||||
hb_vmRequestQuit();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2898,20 +2898,20 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
|
||||
hb_gt_wvt_MouseEvent( pWVT, message, wParam, lParam );
|
||||
return 0;
|
||||
|
||||
case WM_QUERYENDSESSION: /* Closing down computer */
|
||||
hb_vmRequestQuit();
|
||||
case WM_QUERYENDSESSION: /* check if we can shutdown or logoff */
|
||||
return 1;
|
||||
|
||||
case WM_ENDSESSION: /* shutdown started */
|
||||
if( wParam )
|
||||
hb_vmRequestQuit();
|
||||
return 0;
|
||||
|
||||
case WM_CLOSE: /* Clicked 'X' on system menu */
|
||||
if( pWVT->CloseMode == 0 )
|
||||
{
|
||||
PHB_ITEM pItem = hb_itemPutL( NULL, HB_TRUE );
|
||||
hb_setSetItem( HB_SET_CANCEL, pItem );
|
||||
hb_itemRelease( pItem );
|
||||
hb_vmRequestCancel();
|
||||
}
|
||||
hb_vmRequestQuit();
|
||||
else
|
||||
hb_gt_wvt_AddCharToInputQueue( pWVT, HB_K_CLOSE );
|
||||
return 0;
|
||||
|
||||
case WM_QUIT:
|
||||
case WM_DESTROY:
|
||||
@@ -4220,8 +4220,8 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft,
|
||||
case HB_GFX_RECT:
|
||||
r.left = HB_MIN( iLeft, iRight );
|
||||
r.top = HB_MIN( iTop, iBottom );
|
||||
r.right = HB_MAX( iLeft, iRight ) + 1;
|
||||
r.bottom = HB_MAX( iTop, iBottom ) + 1;
|
||||
r.right = HB_MAX( iLeft, iRight );
|
||||
r.bottom = HB_MAX( iTop, iBottom );
|
||||
|
||||
SetGFXContext( iColor );
|
||||
|
||||
@@ -4235,8 +4235,8 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft,
|
||||
|
||||
r.left = HB_MIN( iLeft, iRight );
|
||||
r.top = HB_MIN( iTop, iBottom );
|
||||
r.right = HB_MAX( iLeft, iRight ) + 1;
|
||||
r.bottom = HB_MAX( iTop, iBottom ) + 1;
|
||||
r.right = HB_MAX( iLeft, iRight );
|
||||
r.bottom = HB_MAX( iTop, iBottom );
|
||||
|
||||
iRet = Rectangle( hdc, r.left, r.top, r.right, r.bottom ) ? 1 : 0;
|
||||
|
||||
@@ -4246,7 +4246,7 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft,
|
||||
case HB_GFX_CIRCLE:
|
||||
SetGFXContext( iRight );
|
||||
|
||||
iRet = Arc( hdc, iLeft - iBottom, iTop - iBottom, iLeft + iBottom + 1, iTop + iBottom + 1, 0, 0, 0, 0 ) ? 1 : 0;
|
||||
iRet = Arc( hdc, iLeft - iBottom, iTop - iBottom, iLeft + iBottom, iTop + iBottom, 0, 0, 0, 0 ) ? 1 : 0;
|
||||
|
||||
ClearGFXContext();
|
||||
break;
|
||||
@@ -4254,7 +4254,7 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft,
|
||||
case HB_GFX_FILLEDCIRCLE:
|
||||
SetGFXContext( iRight );
|
||||
|
||||
iRet = Ellipse( hdc, iLeft - iBottom, iTop - iBottom, iLeft + iBottom + 1, iTop + iBottom + 1 ) ? 1 : 0;
|
||||
iRet = Ellipse( hdc, iLeft - iBottom, iTop - iBottom, iLeft + iBottom, iTop + iBottom ) ? 1 : 0;
|
||||
|
||||
ClearGFXContext();
|
||||
break;
|
||||
@@ -4262,7 +4262,7 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft,
|
||||
case HB_GFX_ELLIPSE:
|
||||
SetGFXContext( iColor );
|
||||
|
||||
iRet = Arc( hdc, iLeft - iRight, iTop - iBottom, iLeft + iRight + 1, iTop + iBottom + 1, 0, 0, 0, 0 ) ? 1 : 0;
|
||||
iRet = Arc( hdc, iLeft - iRight, iTop - iBottom, iLeft + iRight, iTop + iBottom, 0, 0, 0, 0 ) ? 1 : 0;
|
||||
|
||||
ClearGFXContext();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user