]> code.delx.au - gnu-emacs/blobdiff - src/w32fns.c
Add classes as run-time descriptors of cl-structs.
[gnu-emacs] / src / w32fns.c
index 6f404e98a62779e4902a5a4460d9fcc94a4520d6..6abb433fd2f0c33943482d4a1505ff7aeadda269 100644 (file)
@@ -157,8 +157,8 @@ typedef BOOL (WINAPI * TrackMouseEvent_Proc)
 typedef LONG (WINAPI * ImmGetCompositionString_Proc)
   (IN HIMC context, IN DWORD index, OUT LPVOID buffer, IN DWORD bufLen);
 typedef HIMC (WINAPI * ImmGetContext_Proc) (IN HWND window);
-typedef HWND (WINAPI * ImmReleaseContext_Proc) (IN HWND wnd, IN HIMC context);
-typedef HWND (WINAPI * ImmSetCompositionWindow_Proc) (IN HIMC context,
+typedef BOOL (WINAPI * ImmReleaseContext_Proc) (IN HWND wnd, IN HIMC context);
+typedef BOOL (WINAPI * ImmSetCompositionWindow_Proc) (IN HIMC context,
                                                      IN COMPOSITIONFORM *form);
 typedef HMONITOR (WINAPI * MonitorFromPoint_Proc) (IN POINT pt, IN DWORD flags);
 typedef BOOL (WINAPI * GetMonitorInfo_Proc)
@@ -3324,9 +3324,13 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
          set_ime_composition_window_fn (context, &form);
          release_ime_context_fn (hwnd, context);
        }
-      /* Pass WM_IME_STARTCOMPOSITION to DefWindowProc, so that the
-        composition window will actually be displayed.  */
-      goto dflt;
+      /* We should "goto dflt" here to pass WM_IME_STARTCOMPOSITION to
+        DefWindowProc, so that the composition window will actually
+        be displayed.  But doing so causes trouble with displaying
+        dialog boxes, such as the file selection dialog or font
+        selection dialog.  So something else is needed to fix the
+        former without breaking the latter.  See bug#11732.  */
+      break;
 
     case WM_IME_ENDCOMPOSITION:
       ignore_ime_char = 0;
@@ -8238,6 +8242,15 @@ w32_sys_ring_bell (struct frame *f)
     MessageBeep (sound_type);
 }
 
+DEFUN ("w32--menu-bar-in-use", Fw32__menu_bar_in_use, Sw32__menu_bar_in_use,
+       0, 0, 0,
+       doc: /* Return non-nil when a menu-bar menu is being used.
+Internal use only.  */)
+  (void)
+{
+  return menubar_in_use ? Qt : Qnil;
+}
+
 \f
 /***********************************************************************
                            Initialization
@@ -8615,6 +8628,7 @@ only be necessary if the default setting causes problems.  */);
   defsubr (&Sw32_frame_rect);
   defsubr (&Sw32_frame_menu_bar_size);
   defsubr (&Sw32_battery_status);
+  defsubr (&Sw32__menu_bar_in_use);
 
 #ifdef WINDOWSNT
   defsubr (&Sfile_system_info);