<div dir="ltr">Hey,<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 25, 2016 at 9:20 AM, Stephan Bergmann <span dir="ltr"><<a href="mailto:sbergman@redhat.com" target="_blank">sbergman@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 05/25/2016 09:01 AM, Tor Lillqvist wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
        --- a/vcl/opengl/win/gdiimpl.cxx<br>
        +++ b/vcl/opengl/win/gdiimpl.cxx<br>
        @@ -166,6 +166,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd,<br>
        UINT message, WPARAM wParam, LPARAM l<br>
                 case VK_SPACE:<br>
                     break;<br>
                 }<br>
        +        SAL_FALLTHROUGH; //TODO ???<br>
             default:<br>
                 return DefWindowProc(hwnd, message, wParam, lParam);<br>
             }<br>
<br>
<br>
I did not write this code, but looking at it, it seems fairly obvious<br>
that the fall-through is intentional here. But it is beyond my<br>
understanding why such a temporary window, that is used only for some<br>
milliseconds, and never even displayed, would need to handle the Escape<br>
and Space keys specially.<br>
</blockquote>
<br></span>
But it does not handle VK_SPACE specially:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)<br>
{<br>
    switch (message)<br>
    {<br>
    case WM_CREATE:<br>
        return 0;<br>
    case WM_CLOSE:<br>
        PostQuitMessage(0);<br>
        return 0;<br>
    case WM_DESTROY:<br>
        return 0;<br>
    case WM_KEYDOWN:<br>
        switch(wParam)<br>
        {<br>
        case VK_ESCAPE:<br>
            PostQuitMessage(0);<br>
            return 0;<br>
<br>
        case VK_SPACE:<br>
            break;<span class=""><br>
        }<br>
        SAL_FALLTHROUGH; //TODO ???<br>
    default:<br>
        return DefWindowProc(hwnd, message, wParam, lParam);<br>
    }<br>
}<br>
</span></blockquote>
<br>
In the inner switch (in case WM_KEYDOWN), VK_SPACE and the (implicit) default both fall through to the outer switch's default case, which looks rather dubious to me (why mention VK_SPACE explicitly, then?). The code is like that ever since <<a href="https://cgit.freedesktop.org/libreoffice/core/commit/?id=0f6fca34909535b48bad41e73e5d3d0e86c744b9" rel="noreferrer" target="_blank">https://cgit.freedesktop.org/libreoffice/core/commit/?id=0f6fca34909535b48bad41e73e5d3d0e86c744b9</a>> "add anti-aliasing init"; whose author is in CC now.</blockquote><div><br><br></div><div>That whole WM_KEYDOWN code is unnecessary.<br><br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
LibreOffice mailing list<br>
<a href="mailto:LibreOffice@lists.freedesktop.org" target="_blank">LibreOffice@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/libreoffice" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/libreoffice</a><br>
</div></div></blockquote></div><br></div></div>