Commit 8be3514f authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Handle the case where the first page isn't visible. (#90336, bug tracked

Fri Sep 27 16:15:11 2002  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtknotebook.c (gtk_notebook_get_event_window_position):
        Handle the case where the first page isn't visible.
        (#90336, bug tracked down by Chema Celorio)
parent 6d915693
Fri Sep 27 16:15:11 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_get_event_window_position):
Handle the case where the first page isn't visible.
(#90336, bug tracked down by Chema Celorio)
Fri Sep 27 15:57:15 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstock.c (builtin_items): Change accelerator
......
Fri Sep 27 16:15:11 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_get_event_window_position):
Handle the case where the first page isn't visible.
(#90336, bug tracked down by Chema Celorio)
Fri Sep 27 15:57:15 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstock.c (builtin_items): Change accelerator
......
Fri Sep 27 16:15:11 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_get_event_window_position):
Handle the case where the first page isn't visible.
(#90336, bug tracked down by Chema Celorio)
Fri Sep 27 15:57:15 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstock.c (builtin_items): Change accelerator
......
Fri Sep 27 16:15:11 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_get_event_window_position):
Handle the case where the first page isn't visible.
(#90336, bug tracked down by Chema Celorio)
Fri Sep 27 15:57:15 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstock.c (builtin_items): Change accelerator
......
Fri Sep 27 16:15:11 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_get_event_window_position):
Handle the case where the first page isn't visible.
(#90336, bug tracked down by Chema Celorio)
Fri Sep 27 15:57:15 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstock.c (builtin_items): Change accelerator
......
Fri Sep 27 16:15:11 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_get_event_window_position):
Handle the case where the first page isn't visible.
(#90336, bug tracked down by Chema Celorio)
Fri Sep 27 15:57:15 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstock.c (builtin_items): Change accelerator
......
......@@ -864,13 +864,23 @@ gtk_notebook_get_event_window_position (GtkNotebook *notebook,
{
GtkWidget *widget = GTK_WIDGET (notebook);
gint border_width = GTK_CONTAINER (notebook)->border_width;
GtkNotebookPage *visible_page = NULL;
GList *tmp_list;
if (notebook->show_tabs && notebook->children)
for (tmp_list = notebook->children; tmp_list; tmp_list = tmp_list->next)
{
if (rectangle)
GtkNotebookPage *page = tmp_list->data;
if (GTK_WIDGET_VISIBLE (page->child))
{
GtkNotebookPage *page = notebook->children->data;
visible_page = page;
break;
}
}
if (notebook->show_tabs && visible_page)
{
if (rectangle)
{
rectangle->x = widget->allocation.x + border_width;
rectangle->y = widget->allocation.y + border_width;
......@@ -879,13 +889,13 @@ gtk_notebook_get_event_window_position (GtkNotebook *notebook,
case GTK_POS_TOP:
case GTK_POS_BOTTOM:
rectangle->width = widget->allocation.width - 2 * border_width;
rectangle->height = page->requisition.height;
rectangle->height = visible_page->requisition.height;
if (notebook->tab_pos == GTK_POS_BOTTOM)
rectangle->y += widget->allocation.height - 2 * border_width - rectangle->height;
break;
case GTK_POS_LEFT:
case GTK_POS_RIGHT:
rectangle->width = page->requisition.width;
rectangle->width = visible_page->requisition.width;
rectangle->height = widget->allocation.height - 2 * border_width;
if (notebook->tab_pos == GTK_POS_RIGHT)
rectangle->x += widget->allocation.width - 2 * border_width - rectangle->width;
......
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