diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-08-28 19:04:48 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2018-08-28 19:04:48 +0100 |
commit | 7d416f031b61d6d6be376ba45018b135505980a7 (patch) | |
tree | 5b9ff59013b179636e98955f2e844c9bd37e3786 | |
parent | b561176bffc9fda559c121ce639bee78c3ab2d8f (diff) | |
parent | 7d0f997a4b8e1b62c9b82e9b10934a6c55a6eb48 (diff) |
Merge branch 'cygwin-patches-for-1.20' into cygwin-release-1.20xserver-cygwin-1.20.1-1
-rw-r--r-- | hw/xwin/man/XWin.man | 2 | ||||
-rw-r--r-- | hw/xwin/man/XWinrc.man | 2 | ||||
-rw-r--r-- | hw/xwin/meson.build | 4 | ||||
-rw-r--r-- | hw/xwin/winlayouts.h | 1 | ||||
-rw-r--r-- | hw/xwin/winwndproc.c | 2 | ||||
-rw-r--r-- | meson.build | 9 | ||||
-rw-r--r-- | os/utils.c | 33 |
7 files changed, 31 insertions, 22 deletions
diff --git a/hw/xwin/man/XWin.man b/hw/xwin/man/XWin.man index 050b4d1b4..ac45108a3 100644 --- a/hw/xwin/man/XWin.man +++ b/hw/xwin/man/XWin.man @@ -110,7 +110,7 @@ Currently \fB\-fullscreen\fP may only be applied to one X screen. .TP 8 .B "\-icon" \fIicon-specifier\fP Override the window icon for the screen window from the default. -The \fIicon-specifier\fP is as defined in \fIXWinrc(__filemansuffix__)\fP. +The \fIicon-specifier\fP is as defined in \fIXWinrc(@filemansuffix@)\fP. .TP 8 .B \-nodecoration Do not give the Cygwin/X window a \fIWindows\fP window border, title bar, diff --git a/hw/xwin/man/XWinrc.man b/hw/xwin/man/XWinrc.man index 15eaca652..005d41126 100644 --- a/hw/xwin/man/XWinrc.man +++ b/hw/xwin/man/XWinrc.man @@ -72,7 +72,7 @@ These options configure the xkeyboard extension to load a particular keyboard map as the X server starts. The behavior is similar to the \fIsetxkbmap\fP(1) program. -See the \fIxkeyboard-config\fP(__miscmansuffix__) manual page for a list of +See the \fIxkeyboard-config\fP(@miscmansuffix@) manual page for a list of keyboard configurations. Alternatively, you can use \fIsetxkbmap\fP(1) program after \fIXWin\fP diff --git a/hw/xwin/meson.build b/hw/xwin/meson.build index f09c5a435..34efcb2aa 100644 --- a/hw/xwin/meson.build +++ b/hw/xwin/meson.build @@ -105,7 +105,7 @@ srcs_windows += [ ] convert = find_program('convert') -custom_target( +x_ico = custom_target( 'xlogo-icon', command: [convert, '-background', 'transparent', '-trim', '-define', 'icon:auto-resize', '@INPUT@', '@OUTPUT@'], input: 'X.svg', @@ -116,6 +116,8 @@ rsrc = windows.compile_resources( 'XWin.rc', args: ['--use-temp-file', '-DHOST="@0@-@1@"'.format(host_machine.system(), host_machine.cpu_family())], include_directories: [include_directories('.'), include_directories('../../include/')], + depend_files: ['XWin.exe.manifest'], + depends: x_ico, ) srcs_windows += rsrc diff --git a/hw/xwin/winlayouts.h b/hw/xwin/winlayouts.h index 0b02fa446..904410a2d 100644 --- a/hw/xwin/winlayouts.h +++ b/hw/xwin/winlayouts.h @@ -65,6 +65,7 @@ WinKBLayoutRec winKBLayouts[] = { {0x0000040b, -1, "pc105", "fi", NULL, NULL, "Finnish"}, {0x0000040c, -1, "pc105", "fr", NULL, NULL, "French (Standard)"}, {0x0000080c, -1, "pc105", "be", NULL, NULL, "French (Belgian)"}, + {0x0001080c, -1, "pc105", "be", NULL, NULL, "Belgian (Comma)"}, {0x00000c0c, -1, "pc105", "ca", "fr-legacy", NULL, "French (Canada, Legacy)"}, {0x0000100c, -1, "pc105", "ch", "fr", NULL, "French (Switzerland)"}, diff --git a/hw/xwin/winwndproc.c b/hw/xwin/winwndproc.c index 4a2d4bd37..c0c4a5ed8 100644 --- a/hw/xwin/winwndproc.c +++ b/hw/xwin/winwndproc.c @@ -1177,7 +1177,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) break; default: - if (message == s_uTaskbarRestart) { + if ((message == s_uTaskbarRestart) && !s_pScreenInfo->fNoTrayIcon) { winInitNotifyIcon(s_pScreenPriv); } break; diff --git a/meson.build b/meson.build index 535634e7b..9858fa960 100644 --- a/meson.build +++ b/meson.build @@ -4,7 +4,7 @@ project('xserver', 'c', 'c_std=gnu99', ], version: '1.20.1', - meson_version: '>= 0.42.0', + meson_version: '>= 0.47.0', ) add_project_arguments('-DHAVE_DIX_CONFIG_H', language: 'c') cc = meson.get_compiler('c') @@ -653,6 +653,13 @@ if build_xorg sdkconfig.set('symbol_visibility', '-fvisibility=hidden') sdkconfig.set('XORG_DRIVER_LIBS', '') + # On Windows, modules built with the SDK will need to link with server and + # module implibs to resolve symbols + if (host_machine.system() == 'cygwin' or + host_machine.system() == 'windows') + sdkconfig.set('XORG_DRIVER_LIBS', '-lXorg.exe -L\${moduledir} -lshadow -lfb -no-undefined') + endif + configure_file( input: 'xorg-server.pc.in', output: 'xorg-server.pc', diff --git a/os/utils.c b/os/utils.c index a04cc7da7..eb2c3b8e8 100644 --- a/os/utils.c +++ b/os/utils.c @@ -55,11 +55,10 @@ OR PERFORMANCE OF THIS SOFTWARE. #ifdef __CYGWIN__ #include <stdlib.h> #include <signal.h> -/* - Sigh... We really need a prototype for this to know it is stdcall, - but #include-ing <windows.h> here is not a good idea... -*/ -__stdcall unsigned long GetTickCount(void); +#define _WIN32_WINNT 0x0600 +#include <X11/Xwindows.h> +#include <assert.h> /* defines made by windows.h prevent misc.h from including assert.h */ +#undef WIN32 /* for the benefit of the conditionals in this file */ #endif #if defined(WIN32) && !defined(__CYGWIN__) @@ -249,7 +248,7 @@ UnlockServer(void) {} #else /* LOCK_SERVER */ static Bool StillLocking = FALSE; -static char LockFile[PATH_MAX]; +static char lockFile[PATH_MAX]; Bool nolock = FALSE; /* @@ -276,10 +275,10 @@ LockServer(void) len = strlen(LOCK_PREFIX) > strlen(LOCK_TMP_PREFIX) ? strlen(LOCK_PREFIX) : strlen(LOCK_TMP_PREFIX); len += strlen(tmppath) + strlen(port) + strlen(LOCK_SUFFIX) + 1; - if (len > sizeof(LockFile)) + if (len > sizeof(lockFile)) FatalError("Display name `%s' is too long\n", port); (void) sprintf(tmp, "%s" LOCK_TMP_PREFIX "%s" LOCK_SUFFIX, tmppath, port); - (void) sprintf(LockFile, "%s" LOCK_PREFIX "%s" LOCK_SUFFIX, tmppath, port); + (void) sprintf(lockFile, "%s" LOCK_PREFIX "%s" LOCK_SUFFIX, tmppath, port); /* * Create a temporary file containing our PID. Attempt three times @@ -322,7 +321,7 @@ LockServer(void) i = 0; haslock = 0; while ((!haslock) && (i++ < 3)) { - haslock = (link(tmp, LockFile) == 0); + haslock = (link(tmp, lockFile) == 0); if (haslock) { /* * We're done. @@ -333,17 +332,17 @@ LockServer(void) /* * Read the pid from the existing file */ - lfd = open(LockFile, O_RDONLY | O_NOFOLLOW); + lfd = open(lockFile, O_RDONLY | O_NOFOLLOW); if (lfd < 0) { unlink(tmp); - FatalError("Can't read lock file %s\n", LockFile); + FatalError("Can't read lock file %s\n", lockFile); } pid_str[0] = '\0'; if (read(lfd, pid_str, 11) != 11) { /* * Bogus lock file. */ - unlink(LockFile); + unlink(lockFile); close(lfd); continue; } @@ -360,7 +359,7 @@ LockServer(void) /* * Stale lock file. */ - unlink(LockFile); + unlink(lockFile); continue; } else if (((t < 0) && (errno == EPERM)) || (t == 0)) { @@ -371,13 +370,13 @@ LockServer(void) FatalError ("Server is already active for display %s\n%s %s\n%s\n", port, "\tIf this server is no longer running, remove", - LockFile, "\tand start again."); + lockFile, "\tand start again."); } } } unlink(tmp); if (!haslock) - FatalError("Could not create server lock file: %s\n", LockFile); + FatalError("Could not create server lock file: %s\n", lockFile); StillLocking = FALSE; } @@ -393,7 +392,7 @@ UnlockServer(void) if (!StillLocking) { - (void) unlink(LockFile); + (void) unlink(lockFile); } } #endif /* LOCK_SERVER */ @@ -449,7 +448,7 @@ GetTimeInMillis(void) CARD64 GetTimeInMicros(void) { - return (CARD64) GetTickCount() * 1000; + return (CARD64) GetTickCount64() * 1000; } #else CARD32 |