Bug 423606 - "Some GTK themes ignore our focus drawing methods" [p=ventnor.bugzilla@yahoo.com.au (Michael Ventnor) r+sr=vlad a1.9b5=beltzner]

This commit is contained in:
reed@reedloden.com 2008-03-21 21:23:33 -07:00
parent 06f781bba5
commit 9579808b51

View File

@ -777,6 +777,11 @@ moz_gtk_button_paint(GdkDrawable* drawable, GdkRectangle* rect,
GTK_BUTTON(widget)->relief = relief;
/* Some theme engines love to cause us pain in that gtk_paint_focus is a
no-op on buttons and button-like widgets. They only listen to this flag. */
if (state->focused && !state->disabled)
GTK_WIDGET_SET_FLAGS(widget, GTK_HAS_FOCUS);
if (!interior_focus && state->focused) {
x += focus_width + focus_pad;
y += focus_width + focus_pad;
@ -822,6 +827,7 @@ moz_gtk_button_paint(GdkDrawable* drawable, GdkRectangle* rect,
}
GTK_WIDGET_UNSET_FLAGS(widget, GTK_HAS_DEFAULT);
GTK_WIDGET_UNSET_FLAGS(widget, GTK_HAS_FOCUS);
return MOZ_GTK_SUCCESS;
}