(x_connection_closed): Add newline when printing error message on stderr.
[bpt/emacs.git] / src / w32term.c
index ea539a0..e0f8409 100644 (file)
@@ -2192,6 +2192,7 @@ x_scroll_bar_handle_click (bar, msg, emacs_event)
        break;
       case SB_ENDSCROLL:
       default:
+       SetScrollPos (SCROLL_BAR_WIN32_WINDOW (bar), SB_CTL, y, TRUE);
        return FALSE;
       }
 
@@ -2393,6 +2394,7 @@ w32_read_socket (sd, bufp, numchars, waitp, expected)
     {
       switch (msg.msg.message)
        {
+#if 0
        case WM_ERASEBKGND:
          f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
          if (f)
@@ -2400,6 +2402,7 @@ w32_read_socket (sd, bufp, numchars, waitp, expected)
              win32_clear_rect (f, NULL, &msg.rect);
            }
          break;
+#endif
        case WM_PAINT:
          {
            f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
@@ -2414,12 +2417,15 @@ w32_read_socket (sd, bufp, numchars, waitp, expected)
                  }
                else
                  {
+                   /* WM_ERASEBKGND is only generated (and processed)
+                      in response to WM_PAINT, so emulate that
+                      behaviour here. */
+                   win32_clear_rect (f, NULL, &msg.rect);
                    dumprectangle (f,
                                   msg.rect.left,
                                   msg.rect.top,
                                   msg.rect.right-msg.rect.left+1,
                                   msg.rect.bottom-msg.rect.top+1);
-                     
                  }
              }
          }
@@ -2479,8 +2485,12 @@ w32_read_socket (sd, bufp, numchars, waitp, expected)
                      add = 1;
                    }
 
-                 /* Throw dead keys away.  */
-                 if (is_dead_key (msg.msg.wParam))
+                 /* Throw dead keys away.  However, be sure not to
+                    throw away the dead key if it was produced using
+                    AltGr and there is a valid AltGr scan code for
+                    this key.  */
+                 if (is_dead_key (msg.msg.wParam) 
+                     && !((VkKeyScan (bufp->code) & 0xff00) == 0x600))
                    break;
 
                  bufp += add;