mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-27 12:15:19 +01:00
repair mouse events
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
parent
4b1c81b7f9
commit
6db46bffc3
@ -207,6 +207,7 @@ EFI_STATUS XPointer::CheckMouseEvent(REFIT_MENU_SCREEN *Screen)
|
|||||||
}
|
}
|
||||||
EFI_STATUS Status = EFI_TIMEOUT;
|
EFI_STATUS Status = EFI_TIMEOUT;
|
||||||
Screen->mAction = ActionNone;
|
Screen->mAction = ActionNone;
|
||||||
|
bool Move = false;
|
||||||
|
|
||||||
if (!IsDragging && MouseEvent == MouseMove)
|
if (!IsDragging && MouseEvent == MouseMove)
|
||||||
MouseEvent = NoEvents;
|
MouseEvent = NoEvents;
|
||||||
@ -218,6 +219,7 @@ EFI_STATUS XPointer::CheckMouseEvent(REFIT_MENU_SCREEN *Screen)
|
|||||||
Screen->mAction = ActionScrollDown;
|
Screen->mAction = ActionScrollDown;
|
||||||
else if (MouseInRect(&Scrollbar) && MouseEvent == LeftMouseDown) {
|
else if (MouseInRect(&Scrollbar) && MouseEvent == LeftMouseDown) {
|
||||||
IsDragging = TRUE;
|
IsDragging = TRUE;
|
||||||
|
Move = true;
|
||||||
// Screen->mAction = ActionMoveScrollbar;
|
// Screen->mAction = ActionMoveScrollbar;
|
||||||
ScrollbarYMovement = 0;
|
ScrollbarYMovement = 0;
|
||||||
ScrollbarOldPointerPlace.XPos = ScrollbarNewPointerPlace.XPos = newPlace.XPos;
|
ScrollbarOldPointerPlace.XPos = ScrollbarNewPointerPlace.XPos = newPlace.XPos;
|
||||||
@ -225,6 +227,7 @@ EFI_STATUS XPointer::CheckMouseEvent(REFIT_MENU_SCREEN *Screen)
|
|||||||
}
|
}
|
||||||
else if (IsDragging && MouseEvent == LeftClick) {
|
else if (IsDragging && MouseEvent == LeftClick) {
|
||||||
IsDragging = FALSE;
|
IsDragging = FALSE;
|
||||||
|
Move = true;
|
||||||
// Screen->mAction = ActionMoveScrollbar;
|
// Screen->mAction = ActionMoveScrollbar;
|
||||||
}
|
}
|
||||||
else if (IsDragging && MouseEvent == MouseMove) {
|
else if (IsDragging && MouseEvent == MouseMove) {
|
||||||
@ -246,7 +249,8 @@ EFI_STATUS XPointer::CheckMouseEvent(REFIT_MENU_SCREEN *Screen)
|
|||||||
else if (MouseEvent == ScrollUp) {
|
else if (MouseEvent == ScrollUp) {
|
||||||
Screen->mAction = ActionScrollUp;
|
Screen->mAction = ActionScrollUp;
|
||||||
}
|
}
|
||||||
else {
|
}
|
||||||
|
if (!Screen->ScrollEnabled || (Screen->mAction == ActionNone && !Move) ) {
|
||||||
for (UINTN EntryId = 0; EntryId < Screen->Entries.size(); EntryId++) {
|
for (UINTN EntryId = 0; EntryId < Screen->Entries.size(); EntryId++) {
|
||||||
if (MouseInRect(&(Screen->Entries[EntryId].Place))) {
|
if (MouseInRect(&(Screen->Entries[EntryId].Place))) {
|
||||||
switch (MouseEvent) {
|
switch (MouseEvent) {
|
||||||
@ -298,7 +302,7 @@ EFI_STATUS XPointer::CheckMouseEvent(REFIT_MENU_SCREEN *Screen)
|
|||||||
Screen->mItemID = 0xFFFF;
|
Screen->mItemID = 0xFFFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Screen->mAction != ActionNone) {
|
if (Screen->mAction != ActionNone) {
|
||||||
|
Loading…
Reference in New Issue
Block a user