virtual void do_response(AbstractProcessLoop& events_loop)
 {
     Application* app = (Application*)events_loop.get_owner();
     _channel.screen()->lock_size();
     _channel.screen()->resize(_width, _height);
     _channel.create_canvas(0, app->get_canvas_types(), _width, _height, _format);
 }
Ejemplo n.º 2
0
void ClipboardReleaseEvent::response(AbstractProcessLoop& events_loop)
{
    if (Platform::get_clipboard_owner() != Platform::owner_client)
        return;

    static_cast<RedClient*>(events_loop.get_owner())->send_agent_clipboard_message(
        VD_AGENT_CLIPBOARD_RELEASE, 0, NULL);
}
Ejemplo n.º 3
0
void AgentTimer::response(AbstractProcessLoop& events_loop)
{
    Application* app = static_cast<Application*>(events_loop.get_owner());
    app->deactivate_interval_timer(this);

    LOG_WARN("timeout while waiting for agent response");
    _client->send_main_attach_channels();
}
Ejemplo n.º 4
0
 virtual void response(AbstractProcessLoop& events_loop)
 {
     Application* app = static_cast<Application*>(events_loop.get_owner());
     RedScreen* screen = app->find_screen(_screen);
     if (screen) {
         screen->update();
     }
 }
Ejemplo n.º 5
0
void ClipboardRequestEvent::response(AbstractProcessLoop& events_loop)
{
    if (Platform::get_clipboard_owner() != Platform::owner_guest) {
        LOG_WARN("received clipboard req from client while clipboard is not owned by guest");
        Platform::on_clipboard_notify(VD_AGENT_CLIPBOARD_NONE, NULL, 0);
        return;
    }

    VDAgentClipboardRequest request = {_type};
    static_cast<RedClient*>(events_loop.get_owner())->send_agent_clipboard_message(
        VD_AGENT_CLIPBOARD_REQUEST, sizeof(request), &request);
}
Ejemplo n.º 6
0
 virtual void response(AbstractProcessLoop& events_loop)
 {
     Application* app = static_cast<Application*>(events_loop.get_owner());
     RedScreen* screen = app->find_screen(_screen);
     if (screen) {
         Lock lock(screen->_layer_changed_lock);
         screen->_active_layer_change_event = false;
         lock.unlock();
         if (screen->_pointer_on_screen) {
             screen->update_pointer_layer();
         }
     }
 }
 virtual void do_response(AbstractProcessLoop& events_loop)
 {
     Application* app = (Application*)events_loop.get_owner();
     _channel.create_canvas(_surface_id, app->get_canvas_types(), _width, _height, _format);
 }
Ejemplo n.º 8
0
void MigrateEndEvent::response(AbstractProcessLoop& events_loop)
{
    static_cast<RedClient*>(events_loop.get_owner())->send_migrate_end();
}
Ejemplo n.º 9
0
void ClipboardNotifyEvent::response(AbstractProcessLoop& events_loop)
{
    static_cast<RedClient*>(events_loop.get_owner())->send_agent_clipboard_notify_message(
        _type, _data, _size);
}
Ejemplo n.º 10
0
void ProcessLoop::QuitEvent::response(AbstractProcessLoop& events_loop)
{
    events_loop.do_quit(_error_code);
}