Fix invalid function signature and a memory leak
Add the missing GParamSpec to on_n_workspaces_changed. Also, we don't need to re-dup the appid, since it's already dup'd.
This commit is contained in:
parent
e57b7ec335
commit
d588b083d9
@ -295,7 +295,7 @@ track_window (ShellAppMonitor *self,
|
|||||||
if (!appid)
|
if (!appid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_hash_table_insert (self->window_to_appid, window, g_strdup (appid));
|
g_hash_table_insert (self->window_to_appid, window, appid);
|
||||||
|
|
||||||
refcount = GPOINTER_TO_UINT (g_hash_table_lookup (self->running_appids, appid));
|
refcount = GPOINTER_TO_UINT (g_hash_table_lookup (self->running_appids, appid));
|
||||||
|
|
||||||
@ -368,6 +368,7 @@ shell_app_monitor_get_window_count (ShellAppMonitor *self,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
shell_app_monitor_on_n_workspaces_changed (MetaScreen *screen,
|
shell_app_monitor_on_n_workspaces_changed (MetaScreen *screen,
|
||||||
|
GParamSpec *pspec,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
ShellAppMonitor *self = SHELL_APP_MONITOR (user_data);
|
ShellAppMonitor *self = SHELL_APP_MONITOR (user_data);
|
||||||
@ -404,7 +405,7 @@ init_window_monitoring (ShellAppMonitor *self)
|
|||||||
|
|
||||||
g_signal_connect (screen, "notify::n-workspaces",
|
g_signal_connect (screen, "notify::n-workspaces",
|
||||||
G_CALLBACK (shell_app_monitor_on_n_workspaces_changed), self);
|
G_CALLBACK (shell_app_monitor_on_n_workspaces_changed), self);
|
||||||
shell_app_monitor_on_n_workspaces_changed (screen, self);
|
shell_app_monitor_on_n_workspaces_changed (screen, NULL, self);
|
||||||
|
|
||||||
g_object_unref (screen);
|
g_object_unref (screen);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user