Commit 95ae539e by Alexander Larsson

Revert "Don't grab focus on realize"

This reverts commit 4efd4231.

We now don't store the extra view visible status, so the problem this
change fixed is gone. And this change caused other focus issues, as
per bug 607060.
parent c8ded383
......@@ -4131,6 +4131,7 @@ size_allocate (GtkWidget *widget,
static void
realize (GtkWidget *widget)
{
GtkWindow *window;
GdkBitmap *stipple;
GtkAdjustment *vadj, *hadj;
NautilusIconContainer *container;
......@@ -4150,6 +4151,11 @@ realize (GtkWidget *widget)
setup_label_gcs (container);
/* make us the focused widget */
g_assert (GTK_IS_WINDOW (gtk_widget_get_toplevel (widget)));
window = GTK_WINDOW (gtk_widget_get_toplevel (widget));
gtk_window_set_focus (window, widget);
stipple = eel_stipple_bitmap_for_screen (
gdk_drawable_get_screen (GDK_DRAWABLE (widget->window)));
......@@ -4169,10 +4175,15 @@ static void
unrealize (GtkWidget *widget)
{
int i;
GtkWindow *window;
NautilusIconContainer *container;
container = NAUTILUS_ICON_CONTAINER (widget);
g_assert (GTK_IS_WINDOW (gtk_widget_get_toplevel (widget)));
window = GTK_WINDOW (gtk_widget_get_toplevel (widget));
gtk_window_set_focus (window, NULL);
for (i = 0; i < LAST_LABEL_COLOR; i++) {
if (container->details->label_gcs [i]) {
g_object_unref (container->details->label_gcs [i]);
......
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