summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2018-09-02 14:02:46 +0300
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2018-09-02 14:02:46 +0300
commit7c4f2cca6bbea95d69461f701cc10df58d77c5ba (patch)
treea42fabb4728d9afccaa6ff6ef36f5057cc8a310b
parentfd5c295d3d51e0a25a298187e9968c8c0c42171b (diff)
downloadmetacity-7c4f2cca6bbea95d69461f701cc10df58d77c5ba.tar.gz
menu: fix cast-function-type warnings
-rw-r--r--src/ui/menu.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ui/menu.c b/src/ui/menu.c
index 48212310..7d946e18 100644
--- a/src/ui/menu.c
+++ b/src/ui/menu.c
@@ -280,6 +280,13 @@ menu_item_new (MenuItem *menuitem, int workspace_id)
return mi;
}
+static void
+free_menu_data (MenuData *menu_data,
+ GClosure *closure)
+{
+ g_free (menu_data);
+}
+
MetaWindowMenu*
meta_window_menu_new (MetaFrames *frames,
MetaMenuOp ops,
@@ -398,7 +405,7 @@ meta_window_menu_new (MetaFrames *frames,
"activate",
G_CALLBACK (activate_cb),
md,
- (GClosureNotify) g_free, 0);
+ (GClosureNotify) free_menu_data, 0);
gtk_menu_shell_append (GTK_MENU_SHELL (submenu), submi);
@@ -425,7 +432,7 @@ meta_window_menu_new (MetaFrames *frames,
"activate",
G_CALLBACK (activate_cb),
md,
- (GClosureNotify) g_free, 0);
+ (GClosureNotify) free_menu_data, 0);
}
if (mi)