From cc285521adf6ec6d20ebe8ce5acecdc924e551cd Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 3 Sep 2007 22:52:38 +0000 Subject: [PATCH] fix translation of wx priority values to the standard Unix ones in SetPriority() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + src/unix/threadpsx.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index b6cfbbdc62..577aee4dde 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -172,6 +172,7 @@ wxGTK: - Replaced g_free with g_border_free to fix crash with newer GTK+. - Fixed crash in settings when using tooltips->tip_window with GTK+ 2.11.6. - Fix WX_GL_STEREO attribute handling (Tristan Mehamli) +- Fix wxThread::SetPriority() when the thread is running (Christos Gourdoupis) wxMac: diff --git a/src/unix/threadpsx.cpp b/src/unix/threadpsx.cpp index 983ac3632a..80623131df 100644 --- a/src/unix/threadpsx.cpp +++ b/src/unix/threadpsx.cpp @@ -1248,7 +1248,7 @@ void wxThread::SetPriority(unsigned int prio) // map wx priorites WXTHREAD_MIN_PRIORITY..WXTHREAD_MAX_PRIORITY // to Unix priorities 20..-20 - if ( setpriority(PRIO_PROCESS, 0, -(2*prio)/5 + 20) == -1 ) + if ( setpriority(PRIO_PROCESS, 0, -(2*(int)prio)/5 + 20) == -1 ) { wxLogError(_("Failed to set thread priority %d."), prio); }