[gnome-boxes] display-page: wait until the widget is realized
- From: Marc-Andre Lureau <malureau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] display-page: wait until the widget is realized
- Date: Mon, 6 Feb 2012 23:16:29 +0000 (UTC)
commit 506ab4a0da4f15f7e8339ba8082bcdb53f5af9ec
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date: Wed Feb 1 22:51:21 2012 +0100
display-page: wait until the widget is realized
It can be that the widget isn't yet realized when "show_display" is
called. Use the first "draw" event to hook the cursor change event to
the display widget.
https://bugzilla.gnome.org/show_bug.cgi?id=669409
src/display-page.vala | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/display-page.vala b/src/display-page.vala
index 21660dd..9c2a9ef 100644
--- a/src/display-page.vala
+++ b/src/display-page.vala
@@ -175,8 +175,14 @@ 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);
+ cursor_id = display.draw.connect (() => {
+ display.disconnect (cursor_id);
+
+ cursor_id = display.get_window ().notify["cursor"].connect (() => {
+ event_box.get_window ().set_cursor (display.get_window ().cursor);
+ });
+
+ return false;
});
show ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]