Browse Source

2008-08-23 Marcus Brinkmann <marcus@g10code.com>

	* src/agent.c (gnupg_allow_set_foregound_window)
	[!HAVE_W32_SYSTEM]: Define it.
Marcus Brinkmann 17 years ago
parent
commit
5e27d84e68
2 changed files with 9 additions and 2 deletions
  1. 5 0
      ChangeLog
  2. 4 2
      src/agent.c

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2008-08-23  Marcus Brinkmann  <marcus@g10code.com>
+
+	* src/agent.c (gnupg_allow_set_foregound_window)
+	[!HAVE_W32_SYSTEM]: Define it.
+
 2008-08-23  Marcus Brinkmann  <marcus@g10code.com>
 
 	* src/Makefile.am [HAVE_W32_SYSTEM]: Build autonomous DLL.

+ 4 - 2
src/agent.c

@@ -58,19 +58,21 @@
 static assuan_context_t agent_ctx = NULL;
 
 
-#ifdef HAVE_W32_SYSTEM
 /* Hack required for Windows.  */
 void 
 gnupg_allow_set_foregound_window (pid_t pid)
 {
   if (!pid || pid == (pid_t)(-1))
     return;
-  if (!AllowSetForegroundWindow (pid))
+#ifdef HAVE_W32_SYSTEM
+  else if (!AllowSetForegroundWindow (pid))
     DEBUG ("AllowSetForegroundWindow(%lu) failed: %i\n",
 	   (unsigned long)pid, GetLastError ());
+#endif
 }
 
 
+#ifdef HAVE_W32_SYSTEM
 /* Helper function to build_w32_commandline. */
 static char *
 build_w32_commandline_copy (char *buffer, const char *string)