app-manager optimizations

- simplify lookup by pid
- less calls to wnck_window_get_pid
- use a gint for the pid
This commit is contained in:
rim
2018-05-28 02:49:18 +03:00
committed by Landry Breuil
parent fd9e313e2e
commit 621de4fd13
2 changed files with 40 additions and 54 deletions

View File

@@ -23,7 +23,7 @@ typedef struct _App App;
struct _App
{
WnckApplication * application;
guint pid;
gint pid;
gchar name[1024];
GdkPixbuf * icon;
};
@@ -39,7 +39,6 @@ typedef struct _XtmAppManager XtmAppManager;
GType xtm_app_manager_get_type (void);
XtmAppManager * xtm_app_manager_new (void);
const GArray * xtm_app_manager_get_app_list (XtmAppManager *manager);
App * xtm_app_manager_get_app_from_pid (XtmAppManager *manager, gint pid);
#endif /* !APP_MANAGER_H */