diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-06-23 11:37:01 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-06-23 11:37:01 +0200 |
commit | f35ac2049a84fd5edbea43f679dfcd3cd4173367 (patch) | |
tree | c8facd52c5fc0a0ab17dcb9f06871468f63da0ee /client/display_channel.cpp | |
parent | 72cf104c2897b4dd124c8a65df02e6895a9f1d88 (diff) | |
download | spice-f35ac2049a84fd5edbea43f679dfcd3cd4173367.tar.gz spice-f35ac2049a84fd5edbea43f679dfcd3cd4173367.tar.xz spice-f35ac2049a84fd5edbea43f679dfcd3cd4173367.zip |
Fix screen resolution changes on old servers
* Correctly check for existing canvas 0
* Don't try to unlock the screen size if there is no active screen
Diffstat (limited to 'client/display_channel.cpp')
-rw-r--r-- | client/display_channel.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/client/display_channel.cpp b/client/display_channel.cpp index 736e9fba..5469653c 100644 --- a/client/display_channel.cpp +++ b/client/display_channel.cpp @@ -1200,7 +1200,7 @@ void DisplayChannel::handle_mode(RedPeer::InMessage* message) { SpiceMsgDisplayMode *mode = (SpiceMsgDisplayMode *)message->data(); - if (screen()) { + if (surfaces_mngr.is_present_canvas(0)) { destroy_primary_surface(); } create_primary_surface(mode->x_res, mode->y_res, @@ -1451,8 +1451,8 @@ void DisplayChannel::create_surface(int surface_id, int width, int height, uint3 void DisplayChannel::destroy_primary_surface() { -#ifdef USE_OGL if (screen()) { +#ifdef USE_OGL if (surfaces_mngr.is_present_canvas(0)) { Canvas *canvas; @@ -1462,11 +1462,11 @@ void DisplayChannel::destroy_primary_surface() screen()->untouch_context(); } } - } #endif - AutoRef<UnlockScreenEvent> unlock_event(new UnlockScreenEvent(screen())); - get_client().push_event(*unlock_event); + AutoRef<UnlockScreenEvent> unlock_event(new UnlockScreenEvent(screen())); + get_client().push_event(*unlock_event); + } AutoRef<DestroyPrimarySurfaceEvent> event(new DestroyPrimarySurfaceEvent(*this)); get_client().push_event(*event); |