aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/emacsclient.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 2cf90f4039b..ddfe19ffbd6 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -1715,8 +1715,13 @@ set_socket (bool no_exit_if_error)
1715} 1715}
1716 1716
1717#ifdef HAVE_NTGUI 1717#ifdef HAVE_NTGUI
1718FARPROC set_fg; /* Pointer to AllowSetForegroundWindow. */ 1718typedef void (* VOIDFNPTR) (void);
1719FARPROC get_wc; /* Pointer to RealGetWindowClassA. */ 1719typedef BOOL (WINAPI *AllowSetForegroundWindow_proc) (DWORD);
1720/* Pointer to AllowSetForegroundWindow. */
1721static AllowSetForegroundWindow_proc set_fg;
1722typedef UINT (WINAPI *RealGetWindowClassA_proc) (HWND, LPSTR, UINT);
1723/* Pointer to RealGetWindowClassA. */
1724static RealGetWindowClassA_proc get_wc;
1720 1725
1721void w32_set_user_model_id (void); 1726void w32_set_user_model_id (void);
1722 1727
@@ -1794,8 +1799,8 @@ w32_give_focus (void)
1794 emacsclient can allow Emacs to grab the focus by calling the function 1799 emacsclient can allow Emacs to grab the focus by calling the function
1795 AllowSetForegroundWindow. Unfortunately, older Windows (W95, W98 and 1800 AllowSetForegroundWindow. Unfortunately, older Windows (W95, W98 and
1796 NT) lack this function, so we have to check its availability. */ 1801 NT) lack this function, so we have to check its availability. */
1797 if ((set_fg = GetProcAddress (user32, "AllowSetForegroundWindow")) 1802 if ((set_fg = (AllowSetForegroundWindow_proc) (VOIDFNPTR) GetProcAddress (user32, "AllowSetForegroundWindow"))
1798 && (get_wc = GetProcAddress (user32, "RealGetWindowClassA"))) 1803 && (get_wc = (RealGetWindowClassA_proc) (VOIDFNPTR) GetProcAddress (user32, "RealGetWindowClassA")))
1799 EnumWindows (w32_find_emacs_process, (LPARAM) 0); 1804 EnumWindows (w32_find_emacs_process, (LPARAM) 0);
1800} 1805}
1801#endif /* HAVE_NTGUI */ 1806#endif /* HAVE_NTGUI */