QCursor RemoteView::localDotCursor() const
{
-#ifdef QTONLY
-const uchar bits[] =
-{ 0xff, 0x8e, 0x8e, 0x8e, 0xff };
-
- QBitmap cursorBitmap = QBitmap::fromData(QSize(5,5), bits , QImage::Format_Mono);
- QBitmap cursorMask = cursorBitmap;
-
- return QCursor(cursorBitmap, cursorMask);
-#else
- QBitmap cursorBitmap(KGlobal::dirs()->findResource("appdata",
- "pics/pointcursor.png"));
- QBitmap cursorMask(KGlobal::dirs()->findResource("appdata",
- "pics/pointcursormask.png"));
- return QCursor(cursorBitmap, cursorMask);
-#endif
+ //we take care of this in paintEvent()
+ return QCursor(Qt::BlankCursor);
}
void RemoteView::focusInEvent(QFocusEvent *event)
critical(parent, caption, message)
#include <QApplication>
+#include <QBitmap>
#include <QCheckBox>
#include <QDialog>
#include <QImage>
installEventFilter(this);
setCursor(((m_dotCursorState == CursorOn) || m_forceLocalCursor) ? localDotCursor() : Qt::BlankCursor);
-#ifdef Q_WS_MAEMO_5
- QApplication::setOverrideCursor(((m_dotCursorState == CursorOn) || m_forceLocalCursor) ? localDotCursor() : Qt::BlankCursor);
-#endif
setMouseTracking(true); // get mouse events even when there is no mousebutton pressed
setFocusPolicy(Qt::WheelFocus);
RemoteView::showDotCursor(state);
setCursor(state == CursorOn ? localDotCursor() : Qt::BlankCursor);
- QApplication::setOverrideCursor(localDotCursor());
-#ifdef Q_WS_MAEMO_5
- QApplication::setOverrideCursor(state == CursorOn ? localDotCursor() : Qt::BlankCursor);
-#endif
}
void VncView::enableScaling(bool scale)
}
}
+ //draw local cursor ourselves, normal mouse pointer doesn't deal with scrolling
+ if((m_dotCursorState == CursorOn) || m_forceLocalCursor) {
+ const uchar bits[] =
+ { 0xff, 0x8e, 0x8e, 0x8e, 0xff };
+
+ QBitmap cursorBitmap = QBitmap::fromData(QSize(5,5), bits , QImage::Format_Mono);
+ cursorBitmap.setMask(cursorBitmap);
+
+ painter.drawPixmap(cursor_x, cursor_y, cursorBitmap);
+ }
+
RemoteView::paintEvent(event);
}