Commit 97c5d384 authored by Claudio Valerio's avatar Claudio Valerio

On linux isAbsourd point is incompatible with multiple desktop. Event a point...

On linux isAbsourd point is incompatible with multiple desktop. Event a point on a desktop could be intended as absould because of the point is checked against the screen position. This leads to a lot of errors when screens are positionned differently than 'standard' position. According to the comment this is used only on mac.
parent a7fafc28
......@@ -940,19 +940,21 @@ void UBBoardView::virtualKeyboardActivated(bool b)
// Apple remote desktop sends funny events when the transmission is bad
bool
UBBoardView::isAbsurdPoint (QPoint point)
bool UBBoardView::isAbsurdPoint(QPoint point)
{
QDesktopWidget *desktop = qApp->desktop ();
#ifdef Q_WS_MACX
QDesktopWidget *desktop = qApp->desktop();
bool isValidPoint = false;
for (int i = 0; i < desktop->numScreens (); i++)
{
QRect screenRect = desktop->screenGeometry (i);
isValidPoint = isValidPoint || screenRect.contains (point);
for (int i = 0; i < desktop->numScreens() && !isValidPoint; i++){
QRect screenRect = desktop->screenGeometry(i);
screenRect=QRect(QPoint(0,0),screenRect.size());
isValidPoint = isValidPoint || screenRect.contains(point);
}
return !isValidPoint;
#else
return false;
#endif
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment