summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp10
-rw-r--r--src/gui/kernel/qt_s60_p.h4
-rw-r--r--src/gui/kernel/qwidget_s60.cpp2
3 files changed, 7 insertions, 9 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index f1bbcae..6919292 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -929,7 +929,7 @@ TTypeUid::Ptr QSymbianControl::MopSupplyObject(TTypeUid id)
return CCoeControl::MopSupplyObject(id);
}
-void QSymbianControl::setFocusSafely(bool focus, bool resetLastFocused)
+void QSymbianControl::setFocusSafely(bool focus)
{
// The stack hack in here is very unfortunate, but it is the only way to ensure proper
// focus in Symbian. If this is not executed, the control which happens to be on
@@ -939,19 +939,17 @@ void QSymbianControl::setFocusSafely(bool focus, bool resetLastFocused)
S60->appUi()->RemoveFromStack(this);
// Symbian doesn't automatically remove focus from the last focused control, so we need to
// remember it and clear focus ourselves.
- if (resetLastFocused && lastFocusedControl && lastFocusedControl != this)
+ if (lastFocusedControl && lastFocusedControl != this)
lastFocusedControl->SetFocus(false);
QT_TRAP_THROWING(S60->appUi()->AddToStackL(this,
ECoeStackPriorityDefault + 1, ECoeStackFlagStandard)); // Note the + 1
- if (resetLastFocused)
- lastFocusedControl = this;
+ lastFocusedControl = this;
this->SetFocus(true);
} else {
S60->appUi()->RemoveFromStack(this);
QT_TRAP_THROWING(S60->appUi()->AddToStackL(this,
ECoeStackPriorityDefault, ECoeStackFlagStandard));
- if (resetLastFocused)
- lastFocusedControl = 0;
+ lastFocusedControl = 0;
this->SetFocus(false);
}
}
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index 3186221..d33791b 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -157,7 +157,7 @@ public:
void setIgnoreFocusChanged(bool enabled) { m_ignoreFocusChanged = enabled; }
void CancelLongTapTimer();
- void setFocusSafely(bool focus, bool resetLastFocused = true);
+ void setFocusSafely(bool focus);
protected:
void Draw(const TRect& aRect) const;
@@ -199,7 +199,7 @@ inline void QS60Data::updateScreenSize()
S60->screenHeightInPixels = params.iPixelSize.iHeight;
S60->screenWidthInTwips = params.iTwipsSize.iWidth;
S60->screenHeightInTwips = params.iTwipsSize.iHeight;
-
+
S60->virtualMouseMaxAccel = qMax(S60->screenHeightInPixels, S60->screenWidthInPixels) / 20;
TReal inches = S60->screenHeightInTwips / (TReal)KTwipsPerInch;
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 07308d2..b0d405a 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -370,7 +370,7 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de
control->MakeVisible(false);
QT_TRAP_THROWING(control->ControlEnv()->AppUi()->AddToStackL(control, ECoeStackPriorityDefault, stackingFlags));
// Avoid keyboard focus to a hidden window.
- control->setFocusSafely(false, false);
+ control->setFocusSafely(false);
RDrawableWindow *const drawableWindow = control->DrawableWindow();
// Request mouse move events.