diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-07 15:42:59 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-07 15:42:59 +0200 |
commit | 71fefe1dc2bcda3a4cc18d71e1acaf161cc059f2 (patch) | |
tree | 23052830d85c8ba9ad4862adf77aa31086573f93 /vcl | |
parent | 52ae345470d8fa657817cf87b3e8e8c1b51bd7da (diff) |
Change "blink times" to be of type sal_uInt64
...and thus consistent with Timer::Get/SetTimeout since
9c7016b5b530ca212b1275f44f9e2fc0527109ee "Scheduler: Changed uLong to
uInt32/uInt64." Otherwise, at least JunitTest_forms_unoapi on 32-bit Linux
would stay busy forever in vcl::Cursor::ImplTimerHdl, alternating among
ImplRestore() and ImplDraw().
Change-Id: Ic3fd349344c105078b52749ca85559fce485d0c4
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/settings.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 2 | ||||
-rw-r--r-- | vcl/win/source/window/salframe.cxx | 5 |
3 files changed, 8 insertions, 5 deletions
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 7d625dfdcf30..76d06be50c21 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -156,7 +156,7 @@ struct ImplStyleData long mnSpinSize; long mnCursorSize; long mnAntialiasedMin; - sal_uLong mnCursorBlinkTime; + sal_uInt64 mnCursorBlinkTime; sal_uLong mnDragFullOptions; sal_uLong mnSelectionOptions; sal_uLong mnDisplayOptions; @@ -1758,13 +1758,13 @@ StyleSettings::GetCursorSize() const } void -StyleSettings::SetCursorBlinkTime( long nBlinkTime ) +StyleSettings::SetCursorBlinkTime( sal_uInt64 nBlinkTime ) { CopyData(); mxData->mnCursorBlinkTime = nBlinkTime; } -long +sal_uInt64 StyleSettings::GetCursorBlinkTime() const { return (long) mxData->mnCursorBlinkTime; diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index 32a3de583d6e..c7acbbc548ae 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -4146,7 +4146,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) g_object_get( pSettings, "gtk-cursor-blink", &blink, (char *)NULL ); if( blink ) { - gint blink_time = STYLE_CURSOR_NOBLINKTIME; + gint blink_time = static_cast<gint>(STYLE_CURSOR_NOBLINKTIME); g_object_get( pSettings, "gtk-cursor-blink-time", &blink_time, (char *)NULL ); // set the blink_time if there is a setting and it is reasonable // else leave the default value diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 47a72052f417..e9da7341573d 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -2657,7 +2657,10 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) aStyleSettings.SetScrollBarSize( GetSystemMetrics( SM_CXVSCROLL ) ); aStyleSettings.SetSpinSize( GetSystemMetrics( SM_CXVSCROLL ) ); - aStyleSettings.SetCursorBlinkTime( GetCaretBlinkTime() ); + UINT blinkTime = GetCaretBlinkTime(); + aStyleSettings.SetCursorBlinkTime( + blinkTime == 0 || blinkTime == INFINITE // 0 indicates error + ? STYLE_CURSOR_NOBLINKTIME : blinkTime ); aStyleSettings.SetFloatTitleHeight( GetSystemMetrics( SM_CYSMCAPTION ) ); aStyleSettings.SetTitleHeight( GetSystemMetrics( SM_CYCAPTION ) ); aStyleSettings.SetActiveBorderColor( ImplWinColorToSal( GetSysColor( COLOR_ACTIVEBORDER ) ) ); |