mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[CONSRV]
- Start a better fix for the mouse event problem described in r62739. - Add a hack for the problem described in CORE-8394, that fixes some Far Manager mouse issues. CORE-8394 svn path=/branches/condrv_restructure/; revision=63792
This commit is contained in:
parent
d06d5833ea
commit
ac51557c0a
1 changed files with 25 additions and 10 deletions
|
@ -610,7 +610,6 @@ GuiConsoleSwitchFullScreen(PGUI_CONSOLE_DATA GuiData);
|
||||||
static VOID
|
static VOID
|
||||||
OnActivate(PGUI_CONSOLE_DATA GuiData, WPARAM wParam)
|
OnActivate(PGUI_CONSOLE_DATA GuiData, WPARAM wParam)
|
||||||
{
|
{
|
||||||
PCONSOLE Console = GuiData->Console;
|
|
||||||
WORD ActivationState = LOWORD(wParam);
|
WORD ActivationState = LOWORD(wParam);
|
||||||
|
|
||||||
DPRINT1("WM_ACTIVATE - ActivationState = %d\n");
|
DPRINT1("WM_ACTIVATE - ActivationState = %d\n");
|
||||||
|
@ -637,12 +636,11 @@ OnActivate(PGUI_CONSOLE_DATA GuiData, WPARAM wParam)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When we are in QuickEdit mode, ignore the next mouse signal
|
* Ignore the next mouse signal when we are going to be enabled again via
|
||||||
* when we are going to be enabled again via the mouse, in order
|
* the mouse, in order to prevent, e.g. when we are in Edit mode, erroneous
|
||||||
* to prevent e.g. an erroneous right-click from the user which
|
* mouse actions from the user that could spoil text selection or copy/pastes.
|
||||||
* would have as an effect to paste some unwanted text...
|
|
||||||
*/
|
*/
|
||||||
if (Console->QuickEdit && (ActivationState == WA_CLICKACTIVE))
|
if (ActivationState == WA_CLICKACTIVE)
|
||||||
GuiData->IgnoreNextMouseSignal = TRUE;
|
GuiData->IgnoreNextMouseSignal = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1386,15 +1384,18 @@ OnMouse(PGUI_CONSOLE_DATA GuiData, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
BOOL Err = FALSE;
|
BOOL Err = FALSE;
|
||||||
PCONSOLE Console = GuiData->Console;
|
PCONSOLE Console = GuiData->Console;
|
||||||
|
|
||||||
|
// FIXME: It's here that we need to check whether we has focus or not
|
||||||
|
// and whether we are in edit mode or not, to know if we need to deal
|
||||||
|
// with the mouse, or not.
|
||||||
|
|
||||||
if (GuiData->IgnoreNextMouseSignal)
|
if (GuiData->IgnoreNextMouseSignal)
|
||||||
{
|
{
|
||||||
if (msg != WM_LBUTTONDOWN &&
|
if (msg != WM_LBUTTONDOWN &&
|
||||||
msg != WM_MBUTTONDOWN &&
|
msg != WM_MBUTTONDOWN &&
|
||||||
msg != WM_RBUTTONDOWN &&
|
msg != WM_RBUTTONDOWN)
|
||||||
msg != WM_MOUSEMOVE)
|
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* If this mouse signal is not a button-down action or a move,
|
* If this mouse signal is not a button-down action
|
||||||
* then it is the last signal being ignored.
|
* then it is the last signal being ignored.
|
||||||
*/
|
*/
|
||||||
GuiData->IgnoreNextMouseSignal = FALSE;
|
GuiData->IgnoreNextMouseSignal = FALSE;
|
||||||
|
@ -1402,7 +1403,7 @@ OnMouse(PGUI_CONSOLE_DATA GuiData, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* This mouse signal is a button-down action or a move.
|
* This mouse signal is a button-down action.
|
||||||
* Ignore it and perform default action.
|
* Ignore it and perform default action.
|
||||||
*/
|
*/
|
||||||
Err = TRUE;
|
Err = TRUE;
|
||||||
|
@ -1610,6 +1611,20 @@ OnMouse(PGUI_CONSOLE_DATA GuiData, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HACK FOR CORE-8394: Ignore the next mouse move signal
|
||||||
|
* just after mouse down click actions.
|
||||||
|
*/
|
||||||
|
switch (msg)
|
||||||
|
{
|
||||||
|
case WM_LBUTTONDOWN:
|
||||||
|
case WM_MBUTTONDOWN:
|
||||||
|
case WM_RBUTTONDOWN:
|
||||||
|
GuiData->IgnoreNextMouseSignal = TRUE;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (!Err)
|
if (!Err)
|
||||||
{
|
{
|
||||||
if (wKeyState & MK_LBUTTON)
|
if (wKeyState & MK_LBUTTON)
|
||||||
|
|
Loading…
Reference in a new issue