From 48535714bfe126331c6eeaae220b4957d49c660a Mon Sep 17 00:00:00 2001 From: Izik Eidus Date: Sun, 25 Oct 2009 14:15:10 +0200 Subject: spice: move create and destroy of the canvas to new place work around for xlib threaded bugs Signed-off-by: Izik Eidus --- client/display_channel.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'client/display_channel.cpp') diff --git a/client/display_channel.cpp b/client/display_channel.cpp index 5412e7f2..5d3a7afd 100644 --- a/client/display_channel.cpp +++ b/client/display_channel.cpp @@ -59,7 +59,9 @@ public: virtual void do_responce(Application& application) { + _channel.destroy_canvas(); _channel.screen()->set_mode(_width, _height, _depth); + _channel.create_canvas(application.get_canvas_types(), _width, _height, _depth); } private: @@ -1061,7 +1063,6 @@ void DisplayChannel::handle_mode(RedPeer::InMessage* message) } } #endif - destroy_canvas(); AutoRef event(new SetModeEvent(*this, mode->x_res, mode->y_res, mode->bits)); get_client().push_event(*event); @@ -1074,8 +1075,6 @@ void DisplayChannel::handle_mode(RedPeer::InMessage* message) _y_res = mode->y_res; _depth = mode->bits; - create_canvas(get_client().get_application().get_canvas_types(), _x_res, - _y_res, _depth); #ifdef USE_OGL if (_canvas->get_pixmap_type() == CANVAS_TYPE_GL) { screen()->set_update_interrupt_trigger(&_interrupt_update); -- cgit