2009-12-17 03:45 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/src/rtl/gtxwc/gtxwc.c
    ! fixed timeout checking in function taking text from clipboard.
      Due to typo it was waiting for XServer answer for 3 milliseconds
      instead of 3 seconds so sometimes it was too small even in local
      usage (i.e. when clipboard was accessed 1-st time by application
      and some internal XLib structures had to be initialized) and
      probably using remote XServers it was able to retrieve only the
      1-st type of selection (if any).
This commit is contained in:
Przemyslaw Czerpak
2009-12-17 02:45:11 +00:00
parent 99f5921c00
commit 29ffa24c0f
2 changed files with 15 additions and 4 deletions

View File

@@ -17,6 +17,16 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-12-17 03:45 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/gtxwc/gtxwc.c
! fixed timeout checking in function taking text from clipboard.
Due to typo it was waiting for XServer answer for 3 milliseconds
instead of 3 seconds so sometimes it was too small even in local
usage (i.e. when clipboard was accessed 1-st time by application
and some internal XLib structures had to be initialized) and
probably using remote XServers it was able to retrieve only the
1-st type of selection (if any).
2009-12-16 21:38 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbwin/hbwin.ch
* contrib/hbwin/tests/testmapi.prg

View File

@@ -3406,14 +3406,15 @@ static void hb_gt_xwc_RequestSelection( PXWND_DEF wnd )
hb_gt_xwc_ProcessMessages( wnd );
if( !wnd->ClipboardRcvd && wnd->ClipboardRequest == aRequest )
{
ULONG ulTime = hb_gt_xwc_CurrentTime() - ulCurrentTime;
struct timeval timeout;
fd_set readfds;
if( hb_gt_xwc_CurrentTime() - ulCurrentTime > 3 )
if( ulTime > 3000 )
break;
timeout.tv_sec = 3;
timeout.tv_usec = 0;
ulTime = 3000 - ulTime;
timeout.tv_sec = ulTime / 1000;
timeout.tv_usec = ( ulTime % 1000 ) / 1000;
FD_ZERO( &readfds );
FD_SET( iConnFD, &readfds );