gtk_widget_style_get (GTK_WIDGET (menu), "horizontal-offset", x,
"vertical-offset", y, NULL);
- *x += window_x;
+ if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
+ {
+ *x = GTK_WIDGET (widget)->allocation.width + window_x - GTK_WIDGET (menu)->allocation.width - *x;
+ }
+ else
+ *x += window_x;
+
*y += window_y;
}
gtk_widget_style_get (GTK_WIDGET (menu), "horizontal-offset", x,
"vertical-offset", y, NULL);
- *x = MAX (0, *x);
+ if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
+ *x = GTK_WIDGET (widget)->allocation.width - GTK_WIDGET (menu)->allocation.width - *x;
+ else
+ *x = MAX (0, *x);
+
*y = MAX (0, *y);
}