mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[CONSRV]: Addendum to r63792: use a separate flag to filter the next-mouse-move event that MUST NOT appear before a button-up event (this appears to be somewhat VM-dependent). See code and CORE-8394 for more details.
svn path=/trunk/; revision=67218
This commit is contained in:
parent
e00d2e49be
commit
33d8a4b74b
3 changed files with 32 additions and 4 deletions
|
@ -1498,6 +1498,21 @@ OnMouse(PGUI_CONSOLE_DATA GuiData, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
BOOL Err = FALSE;
|
BOOL Err = FALSE;
|
||||||
PCONSRV_CONSOLE Console = GuiData->Console;
|
PCONSRV_CONSOLE Console = GuiData->Console;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HACK FOR CORE-8394 (Part 2):
|
||||||
|
*
|
||||||
|
* Check whether we should ignore the next mouse move event.
|
||||||
|
* In either case we reset the HACK flag.
|
||||||
|
*
|
||||||
|
* See Part 1 of this hack below.
|
||||||
|
*/
|
||||||
|
if (GuiData->HackCORE8394IgnoreNextMove && msg == WM_MOUSEMOVE)
|
||||||
|
{
|
||||||
|
GuiData->HackCORE8394IgnoreNextMove = FALSE;
|
||||||
|
goto Quit;
|
||||||
|
}
|
||||||
|
GuiData->HackCORE8394IgnoreNextMove = FALSE;
|
||||||
|
|
||||||
// FIXME: It's here that we need to check whether we have focus or not
|
// FIXME: It's here that we need to check whether we have focus or not
|
||||||
// and whether we are or not in edit mode, in order to know if we need
|
// and whether we are or not in edit mode, in order to know if we need
|
||||||
// to deal with the mouse.
|
// to deal with the mouse.
|
||||||
|
@ -1784,8 +1799,17 @@ OnMouse(PGUI_CONSOLE_DATA GuiData, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* HACK FOR CORE-8394: Ignore the next mouse move signal
|
* HACK FOR CORE-8394 (Part 1):
|
||||||
* just after mouse down click actions.
|
*
|
||||||
|
* It appears that depending on which VM ReactOS runs, the next mouse
|
||||||
|
* signal coming after a button-down action can be a mouse-move (e.g.
|
||||||
|
* on VBox, whereas on QEMU it is not the case). However it is NOT a
|
||||||
|
* rule, so that we cannot use the IgnoreNextMouseSignal flag to just
|
||||||
|
* "ignore" the next mouse event, thinking it would always be a mouse-
|
||||||
|
* move signal.
|
||||||
|
*
|
||||||
|
* To work around this problem (that should really be fixed in Win32k),
|
||||||
|
* we use a second flag to ignore this possible next mouse move signal.
|
||||||
*/
|
*/
|
||||||
switch (msg)
|
switch (msg)
|
||||||
{
|
{
|
||||||
|
@ -1793,7 +1817,7 @@ OnMouse(PGUI_CONSOLE_DATA GuiData, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
case WM_MBUTTONDOWN:
|
case WM_MBUTTONDOWN:
|
||||||
case WM_RBUTTONDOWN:
|
case WM_RBUTTONDOWN:
|
||||||
case WM_XBUTTONDOWN:
|
case WM_XBUTTONDOWN:
|
||||||
GuiData->IgnoreNextMouseSignal = TRUE;
|
GuiData->HackCORE8394IgnoreNextMove = TRUE;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,9 @@ typedef struct _GUI_CONSOLE_DATA
|
||||||
/*** The following may be put per-screen-buffer !! ***/
|
/*** The following may be put per-screen-buffer !! ***/
|
||||||
HCURSOR hCursor; /* Handle to the mouse cursor */
|
HCURSOR hCursor; /* Handle to the mouse cursor */
|
||||||
INT MouseCursorRefCount; /* The reference counter associated with the mouse cursor. >= 0 and the cursor is shown; < 0 and the cursor is hidden. */
|
INT MouseCursorRefCount; /* The reference counter associated with the mouse cursor. >= 0 and the cursor is shown; < 0 and the cursor is hidden. */
|
||||||
BOOL IgnoreNextMouseSignal; /* Used in cases where we don't want to treat a mouse signal */
|
BOOL IgnoreNextMouseSignal; /* Used when we need to not process a mouse signal */
|
||||||
|
|
||||||
|
BOOL HackCORE8394IgnoreNextMove; /* HACK FOR CORE-8394. See conwnd.c!OnMouse for more details. */
|
||||||
|
|
||||||
BOOL IsCloseButtonEnabled; /* TRUE if the Close button and the corresponding system menu item are enabled (default), FALSE otherwise */
|
BOOL IsCloseButtonEnabled; /* TRUE if the Close button and the corresponding system menu item are enabled (default), FALSE otherwise */
|
||||||
UINT CmdIdLow ; /* Lowest menu id of the user-reserved menu id range */
|
UINT CmdIdLow ; /* Lowest menu id of the user-reserved menu id range */
|
||||||
|
|
|
@ -564,6 +564,8 @@ GuiInitFrontEnd(IN OUT PFRONTEND This,
|
||||||
|
|
||||||
/* A priori don't ignore mouse signals */
|
/* A priori don't ignore mouse signals */
|
||||||
GuiData->IgnoreNextMouseSignal = FALSE;
|
GuiData->IgnoreNextMouseSignal = FALSE;
|
||||||
|
/* Initialize HACK FOR CORE-8394. See conwnd.c!OnMouse for more details. */
|
||||||
|
GuiData->HackCORE8394IgnoreNextMove = FALSE;
|
||||||
|
|
||||||
/* Close button and the corresponding system menu item are enabled by default */
|
/* Close button and the corresponding system menu item are enabled by default */
|
||||||
GuiData->IsCloseButtonEnabled = TRUE;
|
GuiData->IsCloseButtonEnabled = TRUE;
|
||||||
|
|
Loading…
Reference in a new issue