8153526: [Unity] Taskbar.getTaskbar().setMenu(null) doesn't remove menu
authorazvegint
Mon, 17 Oct 2016 12:37:09 +0300
changeset 41797 901aa8f0c2ee
parent 41796 7cae5572a413
child 41798 e7e5e4178c27
8153526: [Unity] Taskbar.getTaskbar().setMenu(null) doesn't remove menu Reviewed-by: ssadetsky
jdk/src/java.desktop/unix/native/libawt_xawt/xawt/awt_Taskbar.c
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/xawt/awt_Taskbar.c	Mon Oct 17 10:51:58 2016 +0300
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/xawt/awt_Taskbar.c	Mon Oct 17 12:37:09 2016 +0300
@@ -97,10 +97,7 @@
 
 void callback(DbusmenuMenuitem* mi, guint ts, jobject data) {
     JNIEnv* env = (JNIEnv*) JNU_GetEnv(jvm, JNI_VERSION_1_2);
-    (*env)->CallStaticVoidMethod(env, jTaskbarCls, jTaskbarCallback, data,
-            fp_dbusmenu_menuitem_property_get_int(mi, "toggle-state")
-            ? JNI_FALSE
-            : JNI_TRUE);
+    (*env)->CallStaticVoidMethod(env, jTaskbarCls, jTaskbarCallback, data);
 }
 
 /*
@@ -243,10 +240,9 @@
 
     if (!menu) {
         menu = fp_dbusmenu_menuitem_new();
+        fp_unity_launcher_entry_set_quicklist(entry, menu);
     }
 
-    fp_unity_launcher_entry_set_quicklist(entry, menu);
-
     GList* list = fp_dbusmenu_menuitem_take_children(menu);
     gtk->g_list_free_full(list, gtk->g_object_unref);