[mutter] [MetaWindow] Accessor for the instance part of WM_CLASS property
- From: Tomas Frydrych <tomasf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] [MetaWindow] Accessor for the instance part of WM_CLASS property
- Date: Wed, 17 Mar 2010 16:09:54 +0000 (UTC)
commit d537dd93d5ed86f52aa865a9b498e79f9ae7a225
Author: Tomas Frydrych <tf linux intel com>
Date: Wed Mar 17 09:20:39 2010 +0000
[MetaWindow] Accessor for the instance part of WM_CLASS property
https://bugzilla.gnome.org/show_bug.cgi?id=613128
src/core/window.c | 19 +++++++++++++++++--
src/include/window.h | 1 +
2 files changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 71a4f60..2d12d53 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -8923,8 +8923,8 @@ meta_window_get_description (MetaWindow *window)
/**
* meta_window_get_wm_class:
* @window: a #MetaWindow
- *
- * Return the current value of the WM_CLASS X property.
+ *
+ * Return the current value of the name part of WM_CLASS X property.
*/
const char *
meta_window_get_wm_class (MetaWindow *window)
@@ -8936,6 +8936,21 @@ meta_window_get_wm_class (MetaWindow *window)
}
/**
+ * meta_window_get_wm_class_instance:
+ * @window: a #MetaWindow
+ *
+ * Return the current value of the instance part of WM_CLASS X property.
+ */
+const char *
+meta_window_get_wm_class_instance (MetaWindow *window)
+{
+ if (!window)
+ return NULL;
+
+ return window->res_name;
+}
+
+/**
* meta_window_get_compositor_private:
* @window: a #MetaWindow
*
diff --git a/src/include/window.h b/src/include/window.h
index c2c21f6..d14e76e 100644
--- a/src/include/window.h
+++ b/src/include/window.h
@@ -88,6 +88,7 @@ void meta_window_activate_with_workspace (MetaWindow *window,
MetaWorkspace *workspace);
const char * meta_window_get_description (MetaWindow *window);
const char * meta_window_get_wm_class (MetaWindow *window);
+const char * meta_window_get_wm_class_instance (MetaWindow *window);
/* Return whether the window would be showing if we were on its workspace */
gboolean meta_window_showing_on_its_workspace (MetaWindow *window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]