-
-
-TitleColorThread::TitleColorThread(TitleMain *client, TitleWindow *window, int is_outline)
- : ColorPicker(1, is_outline? _("Outline Color") : _("Text Color"))
-{
- this->client = client;
- this->window = window;
- this->is_outline = is_outline;
-}
-
-int TitleColorThread::handle_new_color(int output, int alpha)
-{
- if( is_outline ) {
- client->config.outline_color = output;
- client->config.outline_alpha = alpha;
- }
- else {
- client->config.color = output;
- client->config.alpha = alpha;
- }
-
- window->lock_window("TitleColorThread::handle_new_color");
- window->update_color();
- window->flush();
- window->unlock_window();
-
- window->send_configure_change();
- return 1;
-}
-
-void TitleColorThread::handle_done_event(int result)
-{
- if( result ) {
- client->config.color = orig_color;
- client->config.alpha = orig_alpha;
- handle_new_color(orig_color, orig_alpha);
- window->update_color();
- window->send_configure_change();
- }
-}
-