Always bring the inspector window in the foreground
This commit is contained in:
parent
07b3eaab7d
commit
dc047272d7
1 changed files with 17 additions and 0 deletions
|
@ -3282,6 +3282,21 @@ midori_view_web_inspector_inspect_web_view_cb (gpointer inspector,
|
||||||
return WEBKIT_WEB_VIEW (inspector_view);
|
return WEBKIT_WEB_VIEW (inspector_view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
midori_view_web_inspector_show_window_cb (gpointer inspector,
|
||||||
|
MidoriView* view)
|
||||||
|
{
|
||||||
|
GtkWidget* inspector_view;
|
||||||
|
GtkWidget* window;
|
||||||
|
|
||||||
|
g_object_get (inspector, "web-view", &inspector_view, NULL);
|
||||||
|
window = gtk_widget_get_toplevel (inspector_view);
|
||||||
|
if (!window)
|
||||||
|
return FALSE;
|
||||||
|
gtk_window_present (GTK_WINDOW (window));
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
midori_view_web_inspector_attach_window_cb (gpointer inspector,
|
midori_view_web_inspector_attach_window_cb (gpointer inspector,
|
||||||
MidoriView* view)
|
MidoriView* view)
|
||||||
|
@ -3413,6 +3428,8 @@ midori_view_construct_web_view (MidoriView* view)
|
||||||
g_object_connect (inspector,
|
g_object_connect (inspector,
|
||||||
"signal::inspect-web-view",
|
"signal::inspect-web-view",
|
||||||
midori_view_web_inspector_inspect_web_view_cb, view,
|
midori_view_web_inspector_inspect_web_view_cb, view,
|
||||||
|
"signal::show-window",
|
||||||
|
midori_view_web_inspector_show_window_cb, view,
|
||||||
"signal::attach-window",
|
"signal::attach-window",
|
||||||
midori_view_web_inspector_attach_window_cb, view,
|
midori_view_web_inspector_attach_window_cb, view,
|
||||||
"signal::detach-window",
|
"signal::detach-window",
|
||||||
|
|
Loading…
Reference in a new issue