(vars_of_mule_charset): Update `utf-2000-version' to
[chise/xemacs-chise.git-] / src / event-msw.c
index f3e7727..d8c07f1 100644 (file)
@@ -56,6 +56,7 @@ Boston, MA 02111-1307, USA.  */
 #include "lstream.h"
 #include "process.h"
 #include "redisplay.h"
+#include "select.h"
 #include "sysproc.h"
 #include "syswait.h"
 #include "systime.h"
@@ -72,7 +73,7 @@ typedef unsigned int SOCKET;
 #include <io.h>
 #include <errno.h>
 
-#if defined (__CYGWIN32__) && !defined (CYGWIN_VERSION_DLL_MAJOR)
+#if defined (__CYGWIN32__) && (CYGWIN_VERSION_DLL_MAJOR < 20)
 typedef NMHDR *LPNMHDR;
 #endif
 
@@ -1614,6 +1615,13 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
   switch (message)
   {
+  case WM_DESTROYCLIPBOARD:
+    /* We own the clipboard and someone else wants it.  Delete our
+       cached copy of the clipboard contents so we'll ask for it from
+       Windows again when someone does a paste. */
+    handle_selection_clear(QCLIPBOARD);
+    break;
+
   case WM_ERASEBKGND:
     /* Erase background only during non-dynamic sizing */
     msframe  = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd)));
@@ -2256,9 +2264,7 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
          VOID_TO_LISP (image_instance, ii);
          if (IMAGE_INSTANCEP (image_instance)
              &&
-             IMAGE_INSTANCE_TYPE_P (image_instance, IMAGE_WIDGET)
-             &&
-             !NILP (XIMAGE_INSTANCE_WIDGET_FACE (image_instance)))
+             IMAGE_INSTANCE_TYPE_P (image_instance, IMAGE_WIDGET))
            {
              /* set colors for the buttons */
              HDC hdc = (HDC)wParam;
@@ -2996,7 +3002,7 @@ vars_of_event_mswindows (void)
   mswindows_s_dispatch_event_queue = Qnil;
   staticpro (&mswindows_s_dispatch_event_queue);
   mswindows_s_dispatch_event_queue_tail = Qnil;
-  pdump_wire (&mswindows_u_dispatch_event_queue_tail);
+  pdump_wire (&mswindows_s_dispatch_event_queue_tail);
 
   mswindows_error_caught_in_modal_loop = Qnil;
   staticpro (&mswindows_error_caught_in_modal_loop);