Revision: 6965
Author: nogu.dev
Date: Thu Feb 17 03:58:00 2011
Log: * helper/eggtrayicon.c
  - (egg_tray_icon_draw): Fix coordinates in GTK+3.
http://code.google.com/p/uim/source/detail?r=6965

Modified:
 /trunk/helper/eggtrayicon.c

=======================================
--- /trunk/helper/eggtrayicon.c Wed Feb 16 01:32:24 2011
+++ /trunk/helper/eggtrayicon.c Thu Feb 17 03:58:00 2011
@@ -315,6 +315,18 @@
 #if GTK_CHECK_VERSION(2, 18, 0)
   if (focus_child && gtk_widget_has_focus (focus_child))
     {
+#if GTK_CHECK_VERSION(2, 90, 0)
+ border_width = gtk_container_get_border_width(GTK_CONTAINER (widget));
+
+      x = border_width;
+      y = border_width;
+
+      width  = gtk_widget_get_allocated_width (widget);
+      height = gtk_widget_get_allocated_height (widget);
+
+      gtk_render_focus (gtk_widget_get_style_context(widget),
+                        cr, x, y, width, height);
+#else
       GtkAllocation allocation;
border_width = gtk_container_get_border_width(GTK_CONTAINER (widget));

@@ -326,10 +338,6 @@
       width  = allocation.width  - 2 * border_width;
       height = allocation.height - 2 * border_width;

-#if GTK_CHECK_VERSION(2, 90, 0)
-      gtk_render_focus (gtk_widget_get_style_context(widget),
-                        cr, x, y, width, height);
-#else
       gtk_paint_focus (gtk_widget_get_style(widget),
                        gtk_widget_get_window(widget),
                        gtk_widget_get_state (widget),

Reply via email to