From ce63434f4b47c89c4e9babd2c63a2e998f188d3f Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sat, 2 Aug 2003 17:25:25 +0000 Subject: Work around for a gtk issue. Do not assert if a click outside the notebook 2003-08-02 Marco Pesenti Gritti * src/ephy-notebook.c: (find_tab_num_at_pos), (button_press_cb): Work around for a gtk issue. Do not assert if a click outside the notebook is reported in button_press, just ignore. --- ChangeLog | 7 +++++++ src/ephy-notebook.c | 9 +++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c2c18e24d..6663a0caa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-08-02 Marco Pesenti Gritti + + * src/ephy-notebook.c: (find_tab_num_at_pos), (button_press_cb): + + Work around for a gtk issue. Do not assert if a click outside the notebook + is reported in button_press, just ignore. + 2003-08-02 Christian Persch * src/ephy-encodings-menu.c: (build_group): diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c index 7ce05b8ca..53265ecb6 100644 --- a/src/ephy-notebook.c +++ b/src/ephy-notebook.c @@ -238,7 +238,12 @@ find_tab_num_at_pos (EphyNotebook *notebook, gint abs_x, gint abs_y) return AFTER_ALL_TABS; } - g_assert (is_in_notebook_window(notebook, abs_x, abs_y)); + /* For some reason unfullscreen + quick click can + cause a wrong click event to be reported to the tab */ + if (!is_in_notebook_window(notebook, abs_x, abs_y)) + { + return NOT_IN_APP_WINDOWS; + } while ((page = gtk_notebook_get_nth_page (nb, page_num))) { @@ -549,7 +554,7 @@ button_press_cb (EphyNotebook *notebook, } if ((event->button == 1) && (event->type == GDK_BUTTON_PRESS) - && (tab_clicked != -1)) + && (tab_clicked >= 0)) { notebook->priv->x_start = event->x_root; notebook->priv->y_start = event->y_root; -- cgit v1.2.3