version update, rpm spec libva/vdpau fix, colorpicker tweaks, revert opencv v4->v3
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / colorpicker.C
index f40a95f8250616ffd43568ffc3df531171a95090..7238d59d043a2adab7472bba5b5ef91e4565626f 100644 (file)
@@ -96,7 +96,7 @@ void ColorPicker::update_gui(int output, int alpha)
 {
        ColorWindow *gui = (ColorWindow *)get_gui();
        if( !gui ) return;
-       gui->lock_window();
+       gui->lock_window("ColorPicker::update_gui");
        this->output = output;
        this->alpha = alpha;
        gui->change_values();
@@ -1342,7 +1342,8 @@ void ColorBoxButton::create_objects()
 
 void ColorBoxButton::set_color(int color)
 {
-       this->color = color;
+       this->color = (color & 0xffffff);
+       this->alpha = (~color>>24) & 0xff;
        int r = (color>>16) & 0xff;
        int g = (color>> 8) & 0xff;
        int b = (color>> 0) & 0xff;
@@ -1403,7 +1404,8 @@ void ColorCircleButton::create_objects()
 
 void ColorCircleButton::set_color(int color)
 {
-       this->color = color;
+       this->color = (color & 0xffffff);
+       this->alpha = (~color>>24);
        int r = (color>>16) & 0xff;
        int g = (color>>8) & 0xff;
        int b = (color>>0) & 0xff;