emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109545: Improve commit in revision 1


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109545: Improve commit in revision 109542.
Date: Fri, 10 Aug 2012 10:16:58 +0300
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109545
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2012-08-10 10:16:58 +0300
message:
  Improve commit in revision 109542.
  
   src/w32fns.c <w32_unicode_gui>: New static variable.
   (globals_of_w32fns): Initialize it according to os_subtype.
   (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
   testing os_subtype.
modified:
  src/ChangeLog
  src/w32fns.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-08-10 07:00:40 +0000
+++ b/src/ChangeLog     2012-08-10 07:16:58 +0000
@@ -1,3 +1,10 @@
+2012-08-10  Eli Zaretskii  <address@hidden>
+
+       * w32fns.c <w32_unicode_gui>: New static variable.
+       (globals_of_w32fns): Initialize it according to os_subtype.
+       (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
+       testing os_subtype.
+
 2012-08-10  Joakim HÃ¥rsman  <address@hidden>  (tiny change)
            Eli Zaretskii  <address@hidden>
 

=== modified file 'src/w32fns.c'
--- a/src/w32fns.c      2012-08-10 06:54:37 +0000
+++ b/src/w32fns.c      2012-08-10 07:16:58 +0000
@@ -189,6 +189,8 @@
 
 static HWND w32_visible_system_caret_hwnd;
 
+static int w32_unicode_gui;
+
 /* From w32menu.c  */
 extern HMENU current_popup_menu;
 static int menubar_in_use = 0;
@@ -1795,7 +1797,7 @@
 w32_init_class (HINSTANCE hinst)
 {
 
-  if (os_subtype == OS_NT)
+  if (w32_unicode_gui)
     {
       WNDCLASSW  uwc;
       INIT_WINDOW_CLASS(uwc);
@@ -2260,7 +2262,7 @@
 
   msh_mousewheel = RegisterWindowMessage (MSH_MOUSEWHEEL);
 
-  while ((os_subtype == OS_NT ? GetMessageW : GetMessageA) (&msg, NULL, 0, 0))
+  while ((w32_unicode_gui ? GetMessageW : GetMessageA) (&msg, NULL, 0, 0))
     {
       if (msg.hwnd == NULL)
        {
@@ -2355,7 +2357,7 @@
        }
       else
        {
-         if (os_subtype == OS_NT)
+         if (w32_unicode_gui)
            DispatchMessageW (&msg);
          else
            DispatchMessageA (&msg);
@@ -3828,7 +3830,7 @@
        }
 
     dflt:
-      return (os_subtype == OS_NT ? DefWindowProcW :  DefWindowProcA) (hwnd, 
msg, wParam, lParam);
+      return (w32_unicode_gui ? DefWindowProcW :  DefWindowProcA) (hwnd, msg, 
wParam, lParam);
     }
 
   /* The most common default return code for handled messages is 0.  */
@@ -7181,6 +7183,11 @@
              doc: /* The ANSI code page used by the system.  */);
   w32_ansi_code_page = GetACP ();
 
+  if (os_subtype == OS_NT)
+    w32_unicode_gui = 1;
+  else
+    w32_unicode_gui = 0;
+
   /* MessageBox does not work without this when linked to comctl32.dll 6.0.  */
   InitCommonControls ();
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]