GNOME Bugzilla – Bug 683273
display-page: avoid critical if display is not set yet
Last modified: 2016-03-31 14:02:43 UTC
Boxes may want to update toolbar title before the display is set, don't spit criticals in this case, and act appropriately.
Created attachment 223326 [details] [review] display-page: avoid critical if display is not set yet
*** Bug 683045 has been marked as a duplicate of this bug. ***
Review of attachment 223326 [details] [review]: Can you add the critical this fixes to the commit log? It's (gnome-boxes:27053): Boxes-CRITICAL **: boxes_display_get_can_grab_mouse: assertion `self != NULL' failed Is this the right fix, or are we just hiding a deeper problem that will come back to byte us later?
Review of attachment 223326 [details] [review]: I checked the bt, and the DisplayPage.display was null when calling update_toolbar_visible(), which can happen before DisplayPage.show_display() is called in App.app.window.window_state_event handler. I will update commit comment.
Review of attachment 223326 [details] [review]: I know that this can get called with a null display, what I'm wondering is if it's normal that we try to call update_toolbar_visible before calling show_display, and if it's something we want to support, or if there's a deeper problem and update_toolbar_visible should never be called that early?
Review of attachment 223326 [details] [review]: I don't think we need to worry much if update_toolbar_visible() is called with null display. We may want to be stricter, but then we have to move the display != null check in the window_state_event handler. Would that make more sense?
No clue, that's why I stopped looking at bug #683045 ;)
Attachment 223326 [details] pushed as 3c25121 - display-page: avoid critical if display is not set yet