attempt to fix stuttering when leaving win32 screen. seems to

work but will let testers make the final call.  also fixed
desktop synchronization by setting a variable that was
mistakenly left unset.  and tried to work around an apparent
bug in MsgWaitForMultipleObjects() that prevented the service
from closing down properly.  start/pause/continue/stop
sequence still doesn't shut down correctly.  start/pause/stop
and start/stop work fine.
This commit is contained in:
crs
2002-07-17 17:27:41 +00:00
parent 82cdfb478a
commit 76cc62d133
7 changed files with 108 additions and 96 deletions

View File

@@ -1,6 +1,7 @@
#include "CMSWindowsScreen.h"
#include "CMSWindowsClipboard.h"
#include "CMSWindowsScreenSaver.h"
#include "CPlatform.h"
#include "CClipboard.h"
#include "IMSWindowsScreenEventHandler.h"
#include "IScreenReceiver.h"
@@ -35,6 +36,7 @@ CMSWindowsScreen::CMSWindowsScreen(IScreenReceiver* receiver,
m_class(NULL),
m_icon(NULL),
m_cursor(NULL),
m_is95Family(CPlatform::isWindows95Family()),
m_window(NULL),
m_x(0), m_y(0),
m_w(0), m_h(0),
@@ -206,7 +208,11 @@ CMSWindowsScreen::mainLoop()
void
CMSWindowsScreen::exitMainLoop()
{
// post an arbitrary message after the quit because
// MsgWaitForMultipleObjects() is broken and might not wake up if
// just WM_QUIT is in the queue.
PostThreadMessage(m_threadID, WM_QUIT, 0, 0);
PostThreadMessage(m_threadID, WM_APP + 1, 0, 0);
}
void

View File

@@ -187,14 +187,7 @@ mouseHook(int code, WPARAM wParam, LPARAM lParam)
// relay the motion
SInt32 x = (SInt32)info->pt.x;
SInt32 y = (SInt32)info->pt.y;
if (info->dwExtraInfo == 0x12345678) {
PostThreadMessage(g_threadID,
SYNERGY_MSG_POST_WARP, x, y);
}
else {
PostThreadMessage(g_threadID,
SYNERGY_MSG_MOUSE_MOVE, x, y);
}
PostThreadMessage(g_threadID, SYNERGY_MSG_MOUSE_MOVE, x, y);
}
return 1;
}

View File

@@ -19,10 +19,13 @@
#define SYNERGY_MSG_MARK WM_APP + 0x0011 // mark id; <unused>
#define SYNERGY_MSG_KEY WM_APP + 0x0012 // vk code; key data
#define SYNERGY_MSG_MOUSE_BUTTON WM_APP + 0x0013 // button msg; <unused>
#define SYNERGY_MSG_MOUSE_MOVE WM_APP + 0x0014 // x; y
#define SYNERGY_MSG_POST_WARP WM_APP + 0x0015 // x; y
#define SYNERGY_MSG_MOUSE_WHEEL WM_APP + 0x0016 // delta; <unused>
#define SYNERGY_MSG_SCREEN_SAVER WM_APP + 0x0017 // activated; <unused>
#define SYNERGY_MSG_MOUSE_WHEEL WM_APP + 0x0014 // delta; <unused>
#define SYNERGY_MSG_MOUSE_MOVE WM_APP + 0x0015 // x; y
#define SYNERGY_MSG_POST_WARP WM_APP + 0x0016 // <unused>; <unused>
#define SYNERGY_MSG_PRE_WARP WM_APP + 0x0017 // x; y
#define SYNERGY_MSG_SCREEN_SAVER WM_APP + 0x0018 // activated; <unused>
#define SYNERGY_MSG_INPUT_FIRST SYNERGY_MSG_KEY
#define SYNERGY_MSG_INPUT_LAST SYNERGY_MSG_PRE_WARP
extern "C" {