[epiphany/gnome-3-36] window: fix critical on startup in app mode
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-36] window: fix critical on startup in app mode
- Date: Fri, 27 Mar 2020 17:56:13 +0000 (UTC)
commit d4a8309fbf020019a973597457d6c5cc8e40aace
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Thu Mar 26 13:43:35 2020 -0500
window: fix critical on startup in app mode
This regressed in 7a4e510e. We have to make sure the title widget is
actually a location entry before using it as such. (In app mode, there
is no location entry.)
src/ephy-window.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 6a1c0a434..5e86aad3f 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -3038,7 +3038,6 @@ ephy_window_update_entry_focus (EphyWindow *window,
EphyWebView *view)
{
GtkWidget *title_widget;
- EphyLocationEntry *lentry;
GtkWidget *entry;
const char *address = NULL;
@@ -3047,10 +3046,10 @@ ephy_window_update_entry_focus (EphyWindow *window,
return;
title_widget = GTK_WIDGET (ephy_header_bar_get_title_widget (EPHY_HEADER_BAR (window->header_bar)));
- lentry = EPHY_LOCATION_ENTRY (title_widget);
- entry = ephy_location_entry_get_entry (lentry);
-
- gtk_entry_grab_focus_without_selecting (GTK_ENTRY (entry));
+ if (EPHY_IS_LOCATION_ENTRY (title_widget)) {
+ entry = ephy_location_entry_get_entry (EPHY_LOCATION_ENTRY (title_widget));
+ gtk_entry_grab_focus_without_selecting (GTK_ENTRY (entry));
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]