GNU bug report logs -
#10299
Emacs doesn't handle Unicode characters in keyboard layout on MS Windows
Previous Next
Full log
Message #92 received at 10299 <at> debbugs.gnu.org (full text, mbox):
Note: I know very little about w32.
> - SetWindowText (FRAME_W32_WINDOW (f), SDATA (name));
> + if (os_subtype == OS_NT)
> + SetWindowTextW (FRAME_W32_WINDOW (f), SDATA (name));
> + else
> + SetWindowText (FRAME_W32_WINDOW (f), SDATA (name));
Can we move the test elsewhere by defining (or #defining) our own
SetWindowText which uses either of the two?
> @@ -1785,20 +1791,39 @@
> static BOOL
> w32_init_class (HINSTANCE hinst)
> {
> - WNDCLASS wc;
> -
> - wc.style = CS_HREDRAW | CS_VREDRAW;
> - wc.lpfnWndProc = (WNDPROC) w32_wnd_proc;
> - wc.cbClsExtra = 0;
> - wc.cbWndExtra = WND_EXTRA_BYTES;
> - wc.hInstance = hinst;
> - wc.hIcon = LoadIcon (hinst, EMACS_CLASS);
> - wc.hCursor = w32_load_cursor (IDC_ARROW);
> - wc.hbrBackground = NULL; /* GetStockObject (WHITE_BRUSH); */
> - wc.lpszMenuName = NULL;
> - wc.lpszClassName = EMACS_CLASS;
> -
> - return (RegisterClass (&wc));
> + WNDCLASSW uwc;
> + WNDCLASS wc;
> +
> + if (os_subtype == OS_NT)
> + {
> + uwc.style = CS_HREDRAW | CS_VREDRAW;
> + uwc.lpfnWndProc = (WNDPROC) w32_wnd_proc;
> + uwc.cbClsExtra = 0;
> + uwc.cbWndExtra = WND_EXTRA_BYTES;
> + uwc.hInstance = hinst;
> + uwc.hIcon = LoadIcon (hinst, EMACS_CLASS);
> + uwc.hCursor = w32_load_cursor (IDC_ARROW);
> + uwc.hbrBackground = NULL; /* GetStockObject (WHITE_BRUSH); */
> + uwc.lpszMenuName = NULL;
> + uwc.lpszClassName = L"Emacs";
> +
> + return (RegisterClassW (&uwc));
> + }
> + else
> + {
> + wc.style = CS_HREDRAW | CS_VREDRAW;
> + wc.lpfnWndProc = (WNDPROC) w32_wnd_proc;
> + wc.cbClsExtra = 0;
> + wc.cbWndExtra = WND_EXTRA_BYTES;
> + wc.hInstance = hinst;
> + wc.hIcon = LoadIcon (hinst, EMACS_CLASS);
> + wc.hCursor = w32_load_cursor (IDC_ARROW);
> + wc.hbrBackground = NULL; /* GetStockObject (WHITE_BRUSH); */
> + wc.lpszMenuName = NULL;
> + wc.lpszClassName = EMACS_CLASS;
> +
> + return (RegisterClass (&wc));
> + }
> }
The two var declarations (WNDCLASSW uwc and WNDCLASS wc) should be moved
within their respective branch. And it'd be better if we could share
some code between the two branches, e.g. using a macro.
Stefan
This bug report was last modified 12 years and 289 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.