comparison pidgin/eggtrayicon.c @ 27177:211b59ac6345

Apply patch that adds support for keyboard navigation for the status icon. Fixes #6515.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Wed, 10 Jun 2009 03:40:27 +0000
parents 584063555949
children
comparison
equal deleted inserted replaced
27176:db373b572015 27177:211b59ac6345
398 } 398 }
399 399
400 static gboolean 400 static gboolean
401 transparent_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data) 401 transparent_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
402 { 402 {
403 gdk_window_clear_area (widget->window, event->area.x, event->area.y, 403 GtkWidget *focus_child = NULL;
404 event->area.width, event->area.height); 404 gint border_width, x, y, width, height;
405 return FALSE; 405 gboolean retval = FALSE;
406
407 gdk_window_clear_area (widget->window, event->area.x, event->area.y,
408 event->area.width, event->area.height);
409
410 if (GTK_WIDGET_CLASS (parent_class)->expose_event)
411 retval = GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
412
413 if (GTK_CONTAINER (widget)->focus_child)
414 focus_child = GTK_CONTAINER (GTK_CONTAINER (widget)->focus_child)->focus_child;
415 if (focus_child && GTK_WIDGET_HAS_FOCUS (focus_child))
416 {
417 border_width = GTK_CONTAINER (widget)->border_width;
418
419 x = widget->allocation.x + border_width;
420 y = widget->allocation.y + border_width;
421
422 width = widget->allocation.width - 2 * border_width;
423 height = widget->allocation.height - 2 * border_width;
424
425 gtk_paint_focus (widget->style, widget->window,
426 GTK_WIDGET_STATE (widget),
427 &event->area, widget, "tray_icon",
428 x, y, width, height);
429 }
430
431 return retval;
406 } 432 }
407 433
408 static void 434 static void
409 make_transparent_again (GtkWidget *widget, GtkStyle *previous_style, 435 make_transparent_again (GtkWidget *widget, GtkStyle *previous_style,
410 gpointer user_data) 436 gpointer user_data)