Show
Ignore:
Timestamp:
01/11/10 15:01:47 (3 years ago)
Author:
saturday06
Message:

jijiojk

Location:
lang/objective-cplusplus/i3/trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/objective-cplusplus/i3/trunk/src/gui-windows/Gui.cpp

    r36373 r36411  
    44namespace i3 { 
    55 
     6 
     7 
    68int global_loop() { 
    79    MSG msg = {}; 
    8     for (;;) { 
     10    while (true) { 
    911        BOOL result = GetMessage(&msg, NULL, 0, 0); 
    10         if (!result) { 
    11             break; 
    12         } else if (result == -1) { 
     12        if (likely(result != -1 && result != 0)) { 
     13            // dirty if-condition is for most expected branch 
     14            TranslateMessage(&msg); 
     15            DispatchMessage(&msg); 
     16            continue; 
     17        } 
     18         
     19        if (result == -1) { 
     20            // error 
    1321            halt << msg.message; 
    14             break; 
    1522        } 
    16  
    17         TranslateMessage(&msg); 
    18         DispatchMessage(&msg); 
     23        break; 
    1924    } 
    2025    return (int)msg.wParam; 
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/gui-windows/GuiModule.h

    r36410 r36411  
    160160            BOOL result = GetMessage(&msg, NULL, 0, 0); 
    161161            if (likely(result != -1 && result != 0 && !break_loop_request)) { 
    162                 // dirty if condition is for most expected branch 
     162                // dirty if-condition is for most expected branch 
    163163                TranslateMessage(&msg); 
    164164                DispatchMessage(&msg); 
     
    187187    template <typename Sender> 
    188188    HWND getCachedWindow(Sender& sender, bool flush = false) { 
     189        // XXX must compare no cached 
    189190        if (!flush) { 
    190191            HWND window = sender.tls.getData(this->thread_id).window_cache;