[gnome-boxes] Update cursor when display cursor change
- From: Marc-Andre Lureau <malureau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Update cursor when display cursor change
- Date: Mon, 24 Oct 2011 21:34:34 +0000 (UTC)
commit 2c5f85cd0e828467d72e37a2259c680995c5f9a5
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date: Mon Oct 24 16:42:18 2011 +0200
Update cursor when display cursor change
src/app.vala | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/app.vala b/src/app.vala
index cc0149b..8e0f3a7 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -251,6 +251,7 @@ private class Boxes.DisplayPage: GLib.Object {
private uint toolbar_show_id;
private uint toolbar_hide_id;
private ulong display_id;
+ private ulong cursor_id;
private Gtk.Label title;
public DisplayPage (Boxes.App app) {
@@ -348,6 +349,10 @@ private class Boxes.DisplayPage: GLib.Object {
return false;
});
+ cursor_id = display.get_window ().notify["cursor"].connect (() => {
+ event_box.get_window ().set_cursor (display.get_window ().cursor);
+ });
+
app.notebook.page = Boxes.AppPage.DISPLAY;
}
@@ -358,6 +363,10 @@ private class Boxes.DisplayPage: GLib.Object {
display.disconnect (display_id);
display_id = 0;
}
+ if (cursor_id != 0) {
+ display.disconnect (cursor_id);
+ cursor_id = 0;
+ }
if (display != null)
event_box.remove (display);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]