OpenJDK / jdk / jdk
changeset 54503:e64a8477cd71
8220349: The fix done for JDK-8214253 have caused issues in JTree behaviour
Reviewed-by: serb, prr
author | pbansal |
---|---|
date | Thu, 04 Apr 2019 12:14:51 +0530 |
parents | d95d9d034034 |
children | 55b0469425e1 |
files | src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c |
diffstat | 1 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c Wed Apr 03 15:56:29 2019 -0700 +++ b/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c Thu Apr 04 12:14:51 2019 +0530 @@ -1777,9 +1777,18 @@ (widget_type == CHECK_BOX || widget_type == RADIO_BUTTON)) { return; } - GtkStyleContext* context = get_style(widget_type, detail); + + GtkStyleContext* context = NULL; if (widget_type == TOOL_TIP) { + context = get_style(widget_type, detail); fp_gtk_style_context_add_class(context, "background"); + } else { + gtk3_widget = gtk3_get_widget(widget_type); + context = fp_gtk_widget_get_style_context (gtk3_widget); + fp_gtk_style_context_save (context); + if (detail != 0) { + transform_detail_string(detail, context); + } } GtkStateFlags flags = get_gtk_flags(state_type); @@ -1795,8 +1804,11 @@ } fp_gtk_render_background (context, cr, x, y, width, height); - - disposeOrRestoreContext(context); + if (widget_type == TOOL_TIP) { + disposeOrRestoreContext(context); + } else { + fp_gtk_style_context_restore (context); + } } static void gtk3_paint_focus(WidgetType widget_type, GtkStateType state_type,