summaryrefslogtreecommitdiff
path: root/src/core/window-props.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/window-props.c')
-rw-r--r--src/core/window-props.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/core/window-props.c b/src/core/window-props.c
index fd08d33f..4d9600c2 100644
--- a/src/core/window-props.c
+++ b/src/core/window-props.c
@@ -1627,6 +1627,29 @@ reload_gtk_application_id (MetaWindow *window,
}
}
+static void
+reload_bamf_desktop_file (MetaWindow *window,
+ MetaPropValue *value,
+ gboolean initial)
+{
+ char *requested = NULL;
+ char *current = window->bamf_desktop_file;
+
+ if (value->type != META_PROP_VALUE_INVALID)
+ {
+ requested = value->v.str;
+ meta_verbose ("Requested _BAMF_DESKTOP_FILE \"%s\" for window %s.\n",
+ requested, window->desc);
+ }
+
+ if (g_strcmp0 (requested, current) != 0)
+ {
+ g_free (current);
+
+ window->bamf_desktop_file = g_strdup (requested);
+ }
+}
+
/**
* Initialises the property hooks system. Each row in the table named "hooks"
* represents an action to take when a property is found on a newly-created
@@ -1677,6 +1700,7 @@ meta_display_init_window_prop_hooks (MetaDisplay *display)
{ display->atom__GTK_THEME_VARIANT, META_PROP_VALUE_UTF8, reload_gtk_theme_variant, },
{ display->atom__GTK_FRAME_EXTENTS, META_PROP_VALUE_CARDINAL_LIST, reload_gtk_frame_extents },
{ display->atom__GTK_APPLICATION_ID, META_PROP_VALUE_UTF8, reload_gtk_application_id },
+ { display->atom__BAMF_DESKTOP_FILE, META_PROP_VALUE_STRING, reload_bamf_desktop_file },
{ 0 },
};