[mutter/wip/wayland-kms: 11/15] window: add meta_window_get_client_type api



commit 0fd0c9c85df8e987ebbf9c025a8eb1bff6e5b93b
Author: Robert Bragg <robert linux intel com>
Date:   Thu Apr 5 12:36:16 2012 +0100

    window: add meta_window_get_client_type api
    
    This adds a getter for the window client type which can currently be
    either META_WINDOW_CLIENT_TYPE_X11 or META_WINDOW_CLIENT_TYPE_WAYLAND.

 src/core/window-private.h |    5 -----
 src/core/window.c         |    6 ++++++
 src/meta/window.h         |    6 ++++++
 3 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/src/core/window-private.h b/src/core/window-private.h
index 634ba08..059c2cc 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -73,11 +73,6 @@ typedef enum {
 
 #define NUMBER_OF_QUEUES 3
 
-typedef enum {
-  META_WINDOW_CLIENT_TYPE_WAYLAND,
-  META_WINDOW_CLIENT_TYPE_X11
-} MetaWindowClientType;
-
 struct _MetaWindow
 {
   GObject parent_instance;
diff --git a/src/core/window.c b/src/core/window.c
index ac7ae40..4434134 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -10332,6 +10332,12 @@ meta_window_get_window_type (MetaWindow *window)
   return window->type;
 }
 
+MetaWindowClientType
+meta_window_get_client_type (MetaWindow *window)
+{
+  return window->client_type;
+}
+
 /**
  * meta_window_get_window_type_atom: (skip)
  * @window: a #MetaWindow
diff --git a/src/meta/window.h b/src/meta/window.h
index 5e09b59..9337972 100644
--- a/src/meta/window.h
+++ b/src/meta/window.h
@@ -51,6 +51,11 @@ typedef enum
   META_WINDOW_OVERRIDE_OTHER
 } MetaWindowType;
 
+typedef enum {
+  META_WINDOW_CLIENT_TYPE_WAYLAND,
+  META_WINDOW_CLIENT_TYPE_X11
+} MetaWindowClientType;
+
 typedef enum
 {
   META_MAXIMIZE_HORIZONTAL = 1 << 0,
@@ -81,6 +86,7 @@ MetaScreen *meta_window_get_screen (MetaWindow *window);
 MetaDisplay *meta_window_get_display (MetaWindow *window);
 Window meta_window_get_xwindow (MetaWindow *window);
 MetaWindowType meta_window_get_window_type (MetaWindow *window);
+MetaWindowClientType meta_window_get_client_type (MetaWindow *window);
 Atom meta_window_get_window_type_atom (MetaWindow *window);
 MetaWorkspace *meta_window_get_workspace (MetaWindow *window);
 int      meta_window_get_monitor (MetaWindow *window);



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