]> git.saurik.com Git - wxWidgets.git/commitdiff
fix translation of wx priority values to the standard Unix ones in SetPriority()
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 3 Sep 2007 22:52:38 +0000 (22:52 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 3 Sep 2007 22:52:38 +0000 (22:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/unix/threadpsx.cpp

index 377b4a831b789254359d1861dac330955628919c..392d75e83e4ee6eaf015ed10e5f7337a3800616b 100644 (file)
@@ -230,6 +230,7 @@ wxGTK:
 - Don't unconditionally add wxCAPTION style to wxMiniFrame
 - Generate wxEVT_COMMAND_LIST_END_LABEL_EDIT event even if label didn't change
 - Fix WX_GL_STEREO attribute handling (Tristan Mehamli)
+- Fix wxThread::SetPriority() when the thread is running (Christos Gourdoupis)
 
 
 2.8.4
index 5d7c3bcd2aba900fe340779a8f24c01d63907ba9..850543d345fe7f52f53103ca647958ec7e21d502 100644 (file)
@@ -1311,7 +1311,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);
             }