[libwnck/wip/muktupavels/prepare-for-wnck-handle: 1/8] class-group: add WnckScreen to private struct
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libwnck/wip/muktupavels/prepare-for-wnck-handle: 1/8] class-group: add WnckScreen to private struct
- Date: Tue, 20 Aug 2019 19:17:23 +0000 (UTC)
commit d75c17003492369fef98cb2ee0aac1d0b5088c6a
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Tue Aug 20 21:21:31 2019 +0300
class-group: add WnckScreen to private struct
libwnck/class-group.c | 7 ++++++-
libwnck/private.h | 3 ++-
libwnck/screen.c | 2 +-
3 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/libwnck/class-group.c b/libwnck/class-group.c
index 4b658d8..72513b8 100644
--- a/libwnck/class-group.c
+++ b/libwnck/class-group.c
@@ -50,6 +50,8 @@
/* Private part of the WnckClassGroup structure */
struct _WnckClassGroupPrivate {
+ WnckScreen *screen;
+
char *res_class;
char *name;
GList *windows;
@@ -220,6 +222,7 @@ wnck_class_group_get (const char *id)
/**
* _wnck_class_group_create:
+ * @screen: a #WnckScreen.
* @res_class: name of the resource class for the group.
*
* Creates a new WnckClassGroup with the specified resource class name. If
@@ -230,7 +233,8 @@ wnck_class_group_get (const char *id)
* matches the @res_class.
**/
WnckClassGroup *
-_wnck_class_group_create (const char *res_class)
+_wnck_class_group_create (WnckScreen *screen,
+ const char *res_class)
{
WnckClassGroup *class_group;
@@ -242,6 +246,7 @@ _wnck_class_group_create (const char *res_class)
NULL);
class_group = g_object_new (WNCK_TYPE_CLASS_GROUP, NULL);
+ class_group->priv->screen = screen;
class_group->priv->res_class = g_strdup (res_class ? res_class : "");
diff --git a/libwnck/private.h b/libwnck/private.h
index 1122f34..492fd2c 100644
--- a/libwnck/private.h
+++ b/libwnck/private.h
@@ -95,8 +95,9 @@ void _wnck_application_destroy (WnckApplication *app);
void _wnck_application_load_icons (WnckApplication *app);
void _wnck_application_shutdown_all (void);
+WnckClassGroup *_wnck_class_group_create (WnckScreen *screen,
+ const char *res_class);
-WnckClassGroup* _wnck_class_group_create (const char *res_class);
void _wnck_class_group_destroy (WnckClassGroup *class_group);
void _wnck_class_group_add_window (WnckClassGroup *class_group,
WnckWindow *window);
diff --git a/libwnck/screen.c b/libwnck/screen.c
index 96325a1..48e7c77 100644
--- a/libwnck/screen.c
+++ b/libwnck/screen.c
@@ -1493,7 +1493,7 @@ update_client_list (WnckScreen *screen)
class_group = wnck_class_group_get (res_class);
if (class_group == NULL)
{
- class_group = _wnck_class_group_create (res_class);
+ class_group = _wnck_class_group_create (screen, res_class);
created_class_groups = g_list_prepend (created_class_groups, class_group);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]