Commit 4a0d6358 authored by Murray Cumming's avatar Murray Cumming
Browse files

UiUtils::show_report_in_browser(): Pass the GdkScreen to gtk_show_uri().

parent 934acfff
...@@ -546,7 +546,12 @@ void UiUtils::show_report_in_browser(const std::string& filepath, Gtk::Window* p ...@@ -546,7 +546,12 @@ void UiUtils::show_report_in_browser(const std::string& filepath, Gtk::Window* p
//Use the GNOME browser: //Use the GNOME browser:
GError* gerror = nullptr; GError* gerror = nullptr;
if(!gtk_show_uri(0 /* screen */, uri.c_str(), GDK_CURRENT_TIME, &gerror)) Glib::RefPtr<Gdk::Screen> screen;
if(parent_window)
screen = parent_window->get_screen();
if(!gtk_show_uri(screen ? screen->gobj() : nullptr,
uri.c_str(), GDK_CURRENT_TIME, &gerror))
{ {
std::cerr << G_STRFUNC << ": " << gerror->message << std::endl; std::cerr << G_STRFUNC << ": " << gerror->message << std::endl;
g_error_free(gerror); g_error_free(gerror);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment