freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype-demos][master] [windows] Fix some GUI keys not w


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype-demos][master] [windows] Fix some GUI keys not working
Date: Sat, 09 Apr 2022 12:39:48 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType Demo Programs

Commits:

1 changed file:

Changes:

  • graph/win32/grwin32.c
    ... ... @@ -59,6 +59,7 @@
    59 59
     /*  Custom messages. */
    
    60 60
     #define WM_STATUS  WM_USER+512
    
    61 61
     #define WM_RESIZE  WM_USER+517
    
    62
    +#define WM_GR_KEY  WM_USER+519
    
    62 63
     
    
    63 64
     
    
    64 65
       typedef struct  Translator_
    
    ... ... @@ -395,10 +396,12 @@ gr_win32_surface_listen_event( grWin32Surface* surface,
    395 396
           break;
    
    396 397
     
    
    397 398
         case WM_CHAR:
    
    399
    +    case WM_GR_KEY:
    
    398 400
           {
    
    399 401
             grevent->type = gr_event_key;
    
    400 402
             grevent->key  = msg.wParam;
    
    401
    -        LOG(( isprint( msg.wParam ) ? "KeyPress: Char = '%c'\n"
    
    403
    +        LOG(( (msg.wParam <= 256 && isprint( msg.wParam ))
    
    404
    +                                    ? "KeyPress: Char = '%c'\n"
    
    402 405
                                         : "KeyPress: Char = <%02x>\n",
    
    403 406
                   msg.wParam ));
    
    404 407
             return;
    
    ... ... @@ -616,7 +619,7 @@ LRESULT CALLBACK Message_Process( HWND handle, UINT mess,
    616 619
         {
    
    617 620
         case WM_CLOSE:
    
    618 621
           /* warn the main thread to quit if it didn't know */
    
    619
    -      PostThreadMessage( surface->host, WM_CHAR, (WPARAM)grKeyEsc, 0 );
    
    622
    +      PostThreadMessage( surface->host, WM_GR_KEY, (WPARAM)grKeyEsc, 0 );
    
    620 623
           break;
    
    621 624
     
    
    622 625
         case WM_SIZE:
    
    ... ... @@ -668,7 +671,7 @@ LRESULT CALLBACK Message_Process( HWND handle, UINT mess,
    668 671
               if ( wParam == trans->winkey )
    
    669 672
               {
    
    670 673
                 /* repost to the main thread */
    
    671
    -            PostThreadMessage( surface->host, WM_CHAR, trans->grkey, 0 );
    
    674
    +            PostThreadMessage( surface->host, WM_GR_KEY, trans->grkey, 0 );
    
    672 675
                 LOG(( "KeyPress: VK = 0x%02x\n", wParam ));
    
    673 676
                 break;
    
    674 677
               }
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]