Ensure main window contents are shown when presented from application.

Bug 763961.

* src/client/application/geary-application.vala
  (GearyApplication::present): Always call show_all on the main window
  since if started hidden, it won't have had that called on it.

* src/client/application/geary-controller.vala:
  (GearyController::on_indicator_activated_application,
   GearyController::on_indicator_activated_composer,
   GearyController::on_indicator_activated_inbox): Always call show_all
  on the main window since if started hidden, it won't have had that
  called on it.
This commit is contained in:
Michael James Gratton 2016-05-08 18:36:49 +10:00 committed by Adam Dingle
parent 4783606f31
commit 56dedd7db7
2 changed files with 11 additions and 9 deletions

View file

@ -171,12 +171,12 @@ public class GearyApplication : Gtk.Application {
if (controller.main_window == null)
return false;
if (!controller.main_window.get_realized())
controller.main_window.show_all();
else
controller.main_window.present_with_time(Gdk.CURRENT_TIME);
// When the app is started hidden, show_all() never gets
// called, do so here to prevent an empty window appearing.
controller.main_window.show_all();
controller.main_window.present();
return true;
}

View file

@ -1482,17 +1482,19 @@ public class GearyController : Geary.BaseObject {
}
private void on_indicator_activated_application(uint32 timestamp) {
// When the app is started hidden, show_all() never gets
// called, do so here to prevent an empty window appearing.
main_window.show_all();
main_window.present_with_time(timestamp);
}
private void on_indicator_activated_composer(uint32 timestamp) {
main_window.present_with_time(timestamp);
on_indicator_activated_application(timestamp);
on_new_message();
}
private void on_indicator_activated_inbox(Geary.Folder folder, uint32 timestamp) {
main_window.present_with_time(timestamp);
on_indicator_activated_application(timestamp);
main_window.folder_list.select_folder(folder);
}