2011-11-14 11:54 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/src/rtl/gtxwc/gtxwc.c
    * minor code cleanup
This commit is contained in:
Przemyslaw Czerpak
2011-11-14 10:54:15 +00:00
parent 34c3faace9
commit 59acee8c4b
2 changed files with 34 additions and 16 deletions

View File

@@ -16,6 +16,10 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-11-14 11:54 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/gtxwc/gtxwc.c
* minor code cleanup
2011-11-13 11:42 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
- contrib/hbclipsm
* contrib/hbplist

View File

@@ -2898,6 +2898,13 @@ static void hb_gt_xwc_WndProc( PXWND_DEF wnd, XEvent *evt )
{
KeySym out;
#ifdef XWC_DEBUG
if( wnd->window != evt->xany.window )
{
printf( "Event: #%d window=%ld (wnd->window=%ld)\r\n", evt->type, evt->xany.window, wnd->window ); fflush(stdout);
}
#endif
switch( evt->type )
{
case Expose:
@@ -2905,9 +2912,9 @@ static void hb_gt_xwc_WndProc( PXWND_DEF wnd, XEvent *evt )
printf( "Event: Expose\r\n" ); fflush(stdout);
#endif
hb_gt_xwc_InvalidatePts( wnd,
evt->xexpose.x , evt->xexpose.y,
evt->xexpose.x + evt->xexpose.width,
evt->xexpose.y + evt->xexpose.height );
evt->xexpose.x , evt->xexpose.y,
evt->xexpose.x + evt->xexpose.width,
evt->xexpose.y + evt->xexpose.height );
break;
case NoExpose:
@@ -2934,22 +2941,25 @@ static void hb_gt_xwc_WndProc( PXWND_DEF wnd, XEvent *evt )
out = XLookupKeysym( &evt->xkey, 0 );
switch( out )
{
/* First of all, let's scan for special codes */
case XK_Shift_L: case XK_Shift_R:
case XK_Shift_L:
case XK_Shift_R:
wnd->keyModifiers.bShift = HB_FALSE;
return;
break;
case XK_Control_L: case XK_Control_R:
case XK_Control_L:
case XK_Control_R:
wnd->keyModifiers.bCtrl = HB_FALSE;
return;
break;
case XK_Meta_L: case XK_Alt_L:
case XK_Meta_L:
case XK_Alt_L:
wnd->keyModifiers.bAlt = HB_FALSE;
return;
break;
case XK_Meta_R: case XK_Alt_R:
case XK_Meta_R:
case XK_Alt_R:
wnd->keyModifiers.bAltGr = HB_FALSE;
return;
break;
}
break;
@@ -3920,18 +3930,22 @@ static void hb_gt_xwc_ProcessMessages( PXWND_DEF wnd )
#else
{
HB_BOOL fRepeat;
XEvent evt;
while( XCheckWindowEvent( wnd->dpy, wnd->window, XWC_STD_MASK, &evt ) )
hb_gt_xwc_WndProc( wnd, &evt );
do
{
XEvent evt;
hb_gt_xwc_UpdateSize( wnd );
hb_gt_xwc_UpdatePts( wnd );
hb_gt_xwc_UpdateCursor( wnd );
fRepeat = HB_FALSE;
while( XCheckWindowEvent( wnd->dpy, wnd->window, XWC_STD_MASK, &evt ) )
{
hb_gt_xwc_WndProc( wnd, &evt );
fRepeat = HB_TRUE;
}
hb_gt_xwc_UpdateSize( wnd );
hb_gt_xwc_UpdatePts( wnd );
hb_gt_xwc_UpdateCursor( wnd );
}
while( fRepeat );
}