[metacity/matching] read role from window



commit 13576cb982557c1fe286322cb88376dad81b258a
Author: Thomas Thurman <tthurman gnome org>
Date:   Fri Jul 10 08:01:19 2009 -0400

    read role from window

 src/core/matching.c |    5 +++--
 src/core/matching.h |    5 ++---
 src/core/window.c   |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/core/matching.c b/src/core/matching.c
index 0e79aff..d781cad 100644
--- a/src/core/matching.c
+++ b/src/core/matching.c
@@ -42,7 +42,7 @@ load_matching_data (void)
 }
 
 void
-meta_matching_load_from_role (MetaWindow *window, gchar *role)
+meta_matching_load_from_role (MetaWindow *window)
 {
   load_matching_data ();
 
@@ -50,9 +50,10 @@ meta_matching_load_from_role (MetaWindow *window, gchar *role)
 }
 
 void
-meta_matching_save_to_role (MetaWindow *window, gchar *role)
+meta_matching_save_to_role (MetaWindow *window)
 {
   gint x, y, w, h;
+  gchar *role = window->role;
 
   if (!role)
     return;
diff --git a/src/core/matching.h b/src/core/matching.h
index 74bc45d..f724e76 100644
--- a/src/core/matching.h
+++ b/src/core/matching.h
@@ -27,10 +27,9 @@
 #include "common.h"
 #include "window.h"
 
-/* XXX rename to meta_window_... now the first param is a window */
-void meta_matching_load_from_role (MetaWindow *window, gchar *role);
+void meta_matching_load_from_role (MetaWindow *window);
 
-void meta_matching_save_to_role (MetaWindow *window, gchar *role);
+void meta_matching_save_to_role (MetaWindow *window);
 
 void meta_matching_save_all (void);
 
diff --git a/src/core/window.c b/src/core/window.c
index 198085f..c4a93e9 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -974,7 +974,7 @@ meta_window_free (MetaWindow  *window,
   
   meta_verbose ("Unmanaging 0x%lx\n", window->xwindow);
 
-  meta_matching_save_to_role (window, "dummy2");
+  meta_matching_save_to_role (window);
 
   if (window->display->compositor)
     meta_compositor_free_window (window->display->compositor, window);



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