mirror of https://github.com/FreeRDP/FreeRDP
Modified flag checks to avoid invalid flag sets.
This commit is contained in:
parent
7102927548
commit
0fa9f06565
|
@ -395,22 +395,6 @@ BOOL xf_generic_ButtonEvent(xfContext* xfc, int x, int y, int button,
|
|||
|
||||
if (flags != 0)
|
||||
{
|
||||
BOOL extended = FALSE;
|
||||
|
||||
if (flags & (PTR_XFLAGS_BUTTON1 | PTR_XFLAGS_BUTTON1))
|
||||
{
|
||||
extended = TRUE;
|
||||
|
||||
if (down)
|
||||
flags |= PTR_XFLAGS_DOWN;
|
||||
}
|
||||
|
||||
if (flags & (PTR_FLAGS_BUTTON1 | PTR_FLAGS_BUTTON2 | PTR_FLAGS_BUTTON3))
|
||||
{
|
||||
if (down)
|
||||
flags |= PTR_FLAGS_DOWN;
|
||||
}
|
||||
|
||||
if (flags & (PTR_FLAGS_WHEEL | PTR_FLAGS_HWHEEL))
|
||||
{
|
||||
if (down)
|
||||
|
@ -418,6 +402,21 @@ BOOL xf_generic_ButtonEvent(xfContext* xfc, int x, int y, int button,
|
|||
}
|
||||
else
|
||||
{
|
||||
BOOL extended = FALSE;
|
||||
|
||||
if (flags & (PTR_XFLAGS_BUTTON1 | PTR_XFLAGS_BUTTON2))
|
||||
{
|
||||
extended = TRUE;
|
||||
|
||||
if (down)
|
||||
flags |= PTR_XFLAGS_DOWN;
|
||||
}
|
||||
else if (flags & (PTR_FLAGS_BUTTON1 | PTR_FLAGS_BUTTON2 | PTR_FLAGS_BUTTON3))
|
||||
{
|
||||
if (down)
|
||||
flags |= PTR_FLAGS_DOWN;
|
||||
}
|
||||
|
||||
if (app)
|
||||
{
|
||||
/* make sure window exists */
|
||||
|
|
Loading…
Reference in New Issue