mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-02-06 18:31:57 +08:00
fix a bug: call SyncUpdate when cursor moved; cursor surface lost when it was moved
This commit is contained in:
@@ -933,6 +933,7 @@ BOOL kernel_RefreshCursor (int* x, int* y, int* button)
|
||||
}
|
||||
|
||||
showcursor ();
|
||||
GAL_SyncUpdate (__gal_screen);
|
||||
}
|
||||
|
||||
// GAL_SyncUpdate (__gal_screen);
|
||||
@@ -944,7 +945,7 @@ BOOL kernel_RefreshCursor (int* x, int* y, int* button)
|
||||
if (csr_bmp.bmBits) {
|
||||
hidecursor ();
|
||||
showcursor ();
|
||||
// GAL_SyncUpdate (__gal_screen);
|
||||
GAL_SyncUpdate (__gal_screen);
|
||||
}
|
||||
else {
|
||||
PCURSOR pcsr = (PCURSOR)CSR_CURRENT;
|
||||
|
||||
@@ -277,6 +277,7 @@ static int PCXVFB_SetCursor (_THIS, GAL_Surface *surface, int hot_x, int hot_y)
|
||||
PCXVFB_UpdateRects (this, 1, &rect);
|
||||
}
|
||||
|
||||
PCXVFB_SyncUpdate (this);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -288,6 +289,7 @@ static int PCXVFB_MoveCursor (_THIS, int x, int y)
|
||||
}
|
||||
|
||||
if (this->hidden->cursor) {
|
||||
GAL_Surface* tmp;
|
||||
GAL_Rect rect;
|
||||
rect.x = boxleft (this);
|
||||
rect.y = boxtop (this);
|
||||
@@ -295,10 +297,12 @@ static int PCXVFB_MoveCursor (_THIS, int x, int y)
|
||||
rect.h = CURSORHEIGHT;
|
||||
|
||||
/* update screen to hide cursor */
|
||||
tmp = this->hidden->cursor;
|
||||
this->hidden->cursor = NULL;
|
||||
PCXVFB_UpdateRects (this, 1, &rect);
|
||||
|
||||
/* update screen to show cursor */
|
||||
this->hidden->cursor = tmp;
|
||||
this->hidden->csr_x = x;
|
||||
this->hidden->csr_y = y;
|
||||
|
||||
@@ -307,6 +311,7 @@ static int PCXVFB_MoveCursor (_THIS, int x, int y)
|
||||
rect.w = CURSORWIDTH;
|
||||
rect.h = CURSORHEIGHT;
|
||||
PCXVFB_UpdateRects (this, 1, &rect);
|
||||
PCXVFB_SyncUpdate (this);
|
||||
}
|
||||
else {
|
||||
this->hidden->csr_x = x;
|
||||
|
||||
Reference in New Issue
Block a user