[mutter/wayland] Revert "Move MetaGroup to be X11-specific"



commit a1427c7130ef6884bc503e2686bd7b49893a5071
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Mar 19 09:11:23 2014 -0400

    Revert "Move MetaGroup to be X11-specific"
    
    This reverts commit f940292cfe5a80290a5dae8a62e05fbcbab32a7f.
    
    Turns out MetaGroup was public API and was used by gnome-shell.
    Ugh.

 src/Makefile.am           |    4 +++-
 src/core/stack.c          |    3 ++-
 src/core/window-private.h |    2 +-
 src/core/window.c         |    2 +-
 src/{x11 => meta}/group.h |   26 +++++++++-----------------
 src/meta/types.h          |    5 +++++
 src/x11/group-private.h   |   41 +++++++++++++++++++++++++++++++++++++++++
 src/x11/group-props.c     |    1 +
 src/x11/group-props.h     |    2 +-
 src/x11/group.c           |    2 +-
 src/x11/window-props.c    |    2 +-
 11 files changed, 66 insertions(+), 24 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index a64c9a1..d67362b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -176,10 +176,11 @@ libmutter_wayland_la_SOURCES =                    \
        x11/iconcache.h                         \
        x11/async-getprop.c                     \
        x11/async-getprop.h                     \
+       x11/group-private.h                     \
        x11/group-props.c                       \
        x11/group-props.h                       \
        x11/group.c                             \
-       x11/group.h                             \
+       meta/group.h                            \
        x11/session.c                           \
        x11/session.h                           \
        x11/window-props.c                      \
@@ -228,6 +229,7 @@ libmutterinclude_base_headers =             \
        meta/display.h                          \
        meta/errors.h                           \
        meta/gradient.h                         \
+       meta/group.h                            \
        meta/keybindings.h                      \
        meta/main.h                             \
        meta/meta-background-actor.h            \
diff --git a/src/core/stack.c b/src/core/stack.c
index ce31944..68400e2 100644
--- a/src/core/stack.c
+++ b/src/core/stack.c
@@ -30,12 +30,13 @@
 #include "window-private.h"
 #include <meta/errors.h>
 #include "frame.h"
+#include <meta/group.h>
 #include <meta/prefs.h>
 #include <meta/workspace.h>
 
 #include <X11/Xatom.h>
 
-#include "x11/group.h"
+#include "x11/group-private.h"
 
 #define WINDOW_HAS_TRANSIENT_TYPE(w)                    \
           (w->type == META_WINDOW_DIALOG ||             \
diff --git a/src/core/window-private.h b/src/core/window-private.h
index 2470b81..b70e04f 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -44,7 +44,7 @@
 #include <clutter/clutter.h>
 
 #include "x11/iconcache.h"
-#include "x11/group.h"
+#include "x11/group-private.h"
 
 #include "wayland/meta-wayland-types.h"
 
diff --git a/src/core/window.c b/src/core/window.c
index caef907..e906f69 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -39,6 +39,7 @@
 #include "ui.h"
 #include "place.h"
 #include <meta/prefs.h>
+#include <meta/group.h>
 #include "resizepopup.h"
 #include "constraints.h"
 #include "mutter-enum-types.h"
@@ -58,7 +59,6 @@
 #include "x11/window-x11.h"
 #include "x11/window-props.h"
 #include "x11/xprops.h"
-#include "x11/group.h"
 #include "x11/session.h"
 
 #include "wayland/meta-wayland-private.h"
diff --git a/src/x11/group.h b/src/meta/group.h
similarity index 84%
rename from src/x11/group.h
rename to src/meta/group.h
index 7d97e44..2ec6478 100644
--- a/src/x11/group.h
+++ b/src/meta/group.h
@@ -1,10 +1,10 @@
 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
 
-/* Mutter window group private header */
+/* Mutter window groups */
 
-/*
+/* 
  * Copyright (C) 2002 Red Hat Inc.
- *
+ * 
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
  * published by the Free Software Foundation; either version 2 of the
@@ -14,7 +14,7 @@
  * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
- *
+ * 
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
@@ -26,21 +26,9 @@
 #include <glib.h>
 #include <meta/types.h>
 
-typedef struct _MetaGroup MetaGroup;
-
-struct _MetaGroup
-{
-  int refcount;
-  MetaDisplay *display;
-  GSList *windows;
-  Window group_leader;
-  char *startup_id;
-  char *wm_client_machine;
-};
-
 /* note, can return NULL */
 MetaGroup* meta_window_get_group       (MetaWindow *window);
-void       meta_window_compute_group   (MetaWindow *window);
+void       meta_window_compute_group   (MetaWindow* window);
 void       meta_window_shutdown_group  (MetaWindow *window);
 
 void       meta_window_group_leader_changed (MetaWindow *window);
@@ -61,3 +49,7 @@ gboolean meta_group_property_notify   (MetaGroup  *group,
                                        XEvent     *event);
 
 #endif
+
+
+
+
diff --git a/src/meta/types.h b/src/meta/types.h
index 13446ef..cd6af2b 100644
--- a/src/meta/types.h
+++ b/src/meta/types.h
@@ -30,6 +30,11 @@ typedef struct _MetaFrame       MetaFrame;
 typedef struct _MetaScreen      MetaScreen;
 typedef struct _MetaWindow      MetaWindow;
 typedef struct _MetaWorkspace   MetaWorkspace;
+/**
+ * MetaGroup: (skip)
+ *
+ */
+typedef struct _MetaGroup       MetaGroup;
 typedef struct _MetaKeyBinding  MetaKeyBinding;
 typedef struct _MetaCursorTracker MetaCursorTracker;
 
diff --git a/src/x11/group-private.h b/src/x11/group-private.h
new file mode 100644
index 0000000..72e6cd2
--- /dev/null
+++ b/src/x11/group-private.h
@@ -0,0 +1,41 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+
+/* Mutter window group private header */
+
+/* 
+ * Copyright (C) 2002 Red Hat Inc.
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef META_GROUP_PRIVATE_H
+#define META_GROUP_PRIVATE_H
+
+#include <meta/group.h>
+
+struct _MetaGroup
+{
+  int refcount;
+  MetaDisplay *display;
+  GSList *windows;
+  Window group_leader;
+  char *startup_id;
+  char *wm_client_machine;
+};
+
+#endif
+
+
+
+
diff --git a/src/x11/group-props.c b/src/x11/group-props.c
index f079d2c..521ffbd 100644
--- a/src/x11/group-props.c
+++ b/src/x11/group-props.c
@@ -21,6 +21,7 @@
 
 #include <config.h>
 #include "group-props.h"
+#include "group-private.h"
 #include "xprops.h"
 #include <X11/Xatom.h>
 
diff --git a/src/x11/group-props.h b/src/x11/group-props.h
index 492b872..1fb49ea 100644
--- a/src/x11/group-props.h
+++ b/src/x11/group-props.h
@@ -22,7 +22,7 @@
 #ifndef META_GROUP_PROPS_H
 #define META_GROUP_PROPS_H
 
-#include "group.h"
+#include <meta/group.h>
 #include "window-private.h"
 
 void meta_group_reload_property         (MetaGroup   *group,
diff --git a/src/x11/group.c b/src/x11/group.c
index 71b2280..8965735 100644
--- a/src/x11/group.c
+++ b/src/x11/group.c
@@ -27,7 +27,7 @@
 
 #include <config.h>
 #include <meta/util.h>
-#include "group.h"
+#include "group-private.h"
 #include "group-props.h"
 #include "window-private.h"
 #include <meta/window.h>
diff --git a/src/x11/window-props.c b/src/x11/window-props.c
index d9aacc6..128dfde 100644
--- a/src/x11/window-props.c
+++ b/src/x11/window-props.c
@@ -44,7 +44,7 @@
 #include <meta/errors.h>
 #include "xprops.h"
 #include "frame.h"
-#include "group.h"
+#include <meta/group.h>
 #include <X11/Xatom.h>
 #include <unistd.h>
 #include <string.h>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]