summaryrefslogtreecommitdiffstats
path: root/client/screen.cpp
diff options
context:
space:
mode:
authorYaniv Kamay <ykamay@redhat.com>2009-12-26 16:01:45 +0200
committerYaniv Kamay <ykamay@redhat.com>2009-12-28 12:35:14 +0200
commit941ba9bf5ca9a8812e7893848943c2cec6a5e6a6 (patch)
tree264e371f1dbdca4a6f7217b4d5190f39509f7eab /client/screen.cpp
parentff2e0dbdb7fd2cc93588f83bfc531c4834ef5cff (diff)
downloadspice-941ba9bf5ca9a8812e7893848943c2cec6a5e6a6.tar.gz
spice-941ba9bf5ca9a8812e7893848943c2cec6a5e6a6.tar.xz
spice-941ba9bf5ca9a8812e7893848943c2cec6a5e6a6.zip
client: restore mouse capture state after screen resizing
Diffstat (limited to 'client/screen.cpp')
-rw-r--r--client/screen.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/client/screen.cpp b/client/screen.cpp
index 39c9dbc5..e9bae8b2 100644
--- a/client/screen.cpp
+++ b/client/screen.cpp
@@ -192,7 +192,14 @@ void RedScreen::set_mode(int width, int height, int depth)
capture_mouse();
}
} else {
+ bool cuptur = is_mouse_captured();
+ if (cuptur) {
+ relase_mouse();
+ }
_window.resize(_size.x, _size.y);
+ if (_active && cuptur) {
+ capture_mouse();
+ }
}
notify_new_size();
}
@@ -677,7 +684,6 @@ void RedScreen::on_activate()
_owner.on_activate_screen(this);
}
-
void RedScreen::on_start_key_interception()
{
_key_interception = true;