Hi Xavi,

My only comment is that some sort of "setcancel" patch 
is mixed into your attached patches, which should definitely 
be deleted.

Brgds,
Viktor

On 2010 Mar 30, at 05:28, Xavi wrote:

> Hi all,
> 
> Sometimes GTWVT leaves the previous mark of cursor. Attached picture to 
> illustrate the issue.
> This happens because the pre-cursor position not is marked with 
> InvalidateRect (RedrawDiff not find differences) getting knocked out of 
> WM_PAINT.
> 
> In GTWVG not happen because overwrite PutChar and for each character insert 
> call TouchCell and force RedrawDiff to find differences although they are the 
> same characters and atributes.
> 
> IMHO is more effective in Windows marking only the previous cursor position.
> I would like to commit the following patch to the repository.
> 
> Index: gtwvt.c
> ===================================================================
> --- gtwvt.c   (revision 14260)
> +++ gtwvt.c   (working copy)
> @@ -1683,15 +1683,19 @@
> 
>         case WM_QUERYENDSESSION: /* Closing down computer */
>            hb_vmRequestQuit();
> -         return 0;
> +         break;   /* DefWindowProc return TRUE [jarabal] */
> 
>         case WM_CLOSE:  /* Clicked 'X' on system menu */
> -         if( hb_gt_wvt_FireEvent( pWVT, HB_GTE_CLOSE ) == 0 )
>            {
> +#        if 0 /* Avoid irregular shutdown if SetCancel( .F. ) [jarabal] */
> +            if( hb_setGetCancel() )
> +               hb_vmRequestCancel();
> +#        else
>               PHB_ITEM pItem = hb_itemPutL( NULL, HB_TRUE );
>               hb_setSetItem( HB_SET_CANCEL, pItem );
>               hb_itemRelease( pItem );
>               hb_vmRequestCancel();
> +#        endif
>            }
>            return 0;
> 
> @@ -2939,7 +2943,20 @@
>   }
> 
>   /* ********************************************************************** */
> +/* Avoid the possible remnant mark of cursor in some cases [jarabal] */
> +static void hb_gt_wvt_SetPos( PHB_GT pGT, int iRow, int iCol )
> +{
> +   PHB_GTWVT pWVT = HB_GTWVT_GET( pGT );
> 
> +   if( pWVT && pWVT->CaretExist && !pWVT->CaretHidden )
> +      HB_GTSELF_REDRAW( pGT, pGT->iRow, pGT->iCol, 1 );
> +
> +   pGT->iRow = iRow;
> +   pGT->iCol = iCol;
> +}
> +
> +/* ********************************************************************** */
> +
>   static HB_BOOL hb_gt_wvt_SetDispCP( PHB_GT pGT, const char * pszTermCDP, 
> const char * pszHostCDP, HB_BOOL fBox )
>   {
>      HB_GTSUPER_SETDISPCP( pGT, pszTermCDP, pszHostCDP, fBox );
> @@ -3046,6 +3063,7 @@
>      pFuncTable->SetMode              = hb_gt_wvt_SetMode;
>      pFuncTable->Redraw               = hb_gt_wvt_Redraw;
>      pFuncTable->Refresh              = hb_gt_wvt_Refresh;
> +   pFuncTable->SetPos               = hb_gt_wvt_SetPos;
>      pFuncTable->Version              = hb_gt_wvt_Version;
>      pFuncTable->Tone                 = hb_gt_wvt_Tone;
>      pFuncTable->Info                 = hb_gt_wvt_Info;
> 
> -- 
> Xavi
> 
> <MemoEdit.jpg>_______________________________________________
> Harbour mailing list (attachment size limit: 40KB)
> Harbour@harbour-project.org
> http://lists.harbour-project.org/mailman/listinfo/harbour

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to