* Re: [Emacs-diffs] master 97d7a0b: Improve the register-hotkey functionality on MS-Windows
[not found] ` <E1aZG1A-0002yX-Nl@vcs.savannah.gnu.org>
@ 2016-03-05 23:37 ` Ken Brown
2016-03-06 15:55 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Ken Brown @ 2016-03-05 23:37 UTC (permalink / raw)
To: emacs-devel, Jussi Lahdenniemi
[-- Attachment #1: Type: text/plain, Size: 319 bytes --]
This commit broke the Cygwin-w32 build, initially with a link failure
because of undefined symbols w32_console_unicode_input and
keyboard_handle. I'm attaching a minimal patch that allowed the build
to succeed. I didn't look closely to see what other parts of this
commit should be conditioned on WINDOWSNT.
Ken
[-- Attachment #2: fix_cygwin_w32_build.patch --]
[-- Type: text/plain, Size: 1684 bytes --]
diff --git a/src/w32fns.c b/src/w32fns.c
index 10c8af7..0fe6a6f 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -2112,6 +2112,7 @@ my_post_msg (W32Msg * wmsg, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
post_msg (wmsg);
}
+#ifdef WINDOWSNT
/* The Windows keyboard hook callback. */
static LRESULT CALLBACK
funhook (int code, WPARAM w, LPARAM l)
@@ -2370,6 +2371,7 @@ remove_w32_kbdhook (void)
kbdhook.hook = NULL;
}
}
+#endif /* WINDOWSNT */
/* Mark a specific key combination as hooked, preventing it to be
handled by the system. */
@@ -4734,12 +4736,16 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
goto dflt;
+#ifdef WINDOWSNT
case WM_CREATE:
setup_w32_kbdhook ();
goto dflt;
+#endif
case WM_DESTROY:
+#ifdef WINDOWSNT
remove_w32_kbdhook ();
+#endif
CoUninitialize ();
return 0;
diff --git a/src/w32term.h b/src/w32term.h
index aed89d8..7c23bc4 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -738,11 +738,15 @@ extern int handle_file_notifications (struct input_event *);
extern void w32_initialize_display_info (Lisp_Object);
extern void initialize_w32_display (struct terminal *, int *, int *);
+#ifdef WINDOWSNT
/* Keyboard hooks. */
extern void setup_w32_kbdhook (void);
extern void remove_w32_kbdhook (void);
extern int check_w32_winkey_state (int);
#define w32_kbdhook_active (os_subtype != OS_9X)
+#else
+#define w32_kbdhook_active 0
+#endif
/* Keypad command key support. W32 doesn't have virtual keys defined
for the function keys on the keypad (they are mapped to the standard
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Emacs-diffs] master 97d7a0b: Improve the register-hotkey functionality on MS-Windows
2016-03-05 23:37 ` [Emacs-diffs] master 97d7a0b: Improve the register-hotkey functionality on MS-Windows Ken Brown
@ 2016-03-06 15:55 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2016-03-06 15:55 UTC (permalink / raw)
To: Ken Brown; +Cc: jussi, emacs-devel
> From: Ken Brown <kbrown@cornell.edu>
> Date: Sat, 5 Mar 2016 18:37:45 -0500
>
> This commit broke the Cygwin-w32 build, initially with a link failure
> because of undefined symbols w32_console_unicode_input and
> keyboard_handle.
Sorry about that.
> I'm attaching a minimal patch that allowed the build to succeed. I
> didn't look closely to see what other parts of this commit should be
> conditioned on WINDOWSNT.
LGTM, please commit.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-06 15:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20160226105304.11372.14593@vcs.savannah.gnu.org>
[not found] ` <E1aZG1A-0002yX-Nl@vcs.savannah.gnu.org>
2016-03-05 23:37 ` [Emacs-diffs] master 97d7a0b: Improve the register-hotkey functionality on MS-Windows Ken Brown
2016-03-06 15:55 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).