* made hiding and unhiding the cursor actually work
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15918 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -100,8 +100,22 @@ HWInterface::SetCursorVisible(bool visible)
|
|||||||
{
|
{
|
||||||
if (WriteLock()) {
|
if (WriteLock()) {
|
||||||
if (fCursorVisible != visible) {
|
if (fCursorVisible != visible) {
|
||||||
fCursorVisible = visible;
|
// NOTE: _CursorFrame() will
|
||||||
Invalidate(_CursorFrame());
|
// return an invalid rect if
|
||||||
|
// fCursorVisible == false!
|
||||||
|
if (visible) {
|
||||||
|
fCursorVisible = visible;
|
||||||
|
BRect r = _CursorFrame();
|
||||||
|
|
||||||
|
_DrawCursor(r);
|
||||||
|
Invalidate(r);
|
||||||
|
} else {
|
||||||
|
BRect r = _CursorFrame();
|
||||||
|
fCursorVisible = visible;
|
||||||
|
|
||||||
|
_RestoreCursorArea();
|
||||||
|
Invalidate(r);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
WriteUnlock();
|
WriteUnlock();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user