summaryrefslogtreecommitdiff
path: root/src/core/matching.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/matching.c')
-rw-r--r--src/core/matching.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/core/matching.c b/src/core/matching.c
index f63e56ba..56eaec87 100644
--- a/src/core/matching.c
+++ b/src/core/matching.c
@@ -22,6 +22,7 @@
*/
#include "matching.h"
+#include "window-private.h"
/**
* We currently keep this information in a GKeyFile.
@@ -41,7 +42,7 @@ load_matching_data (void)
}
MetaMatching*
-meta_matching_load_from_role (gchar *role)
+meta_matching_load_from_role (MetaWindow *window, gchar *role)
{
load_matching_data ();
@@ -50,20 +51,21 @@ meta_matching_load_from_role (gchar *role)
}
void
-meta_matching_save_to_role (gchar *role, MetaMatching *matching)
+meta_matching_save_to_role (MetaWindow *window, gchar *role)
{
- g_assert (matching);
+ gint x, y, w, h;
if (!role)
return;
load_matching_data ();
- g_key_file_set_integer (matching_keyfile, role, "x", matching->x);
- g_key_file_set_integer (matching_keyfile, role, "y", matching->y);
- g_key_file_set_integer (matching_keyfile, role, "w", matching->width);
- g_key_file_set_integer (matching_keyfile, role, "h", matching->height);
- g_key_file_set_integer (matching_keyfile, role, "d", matching->workspace);
+ meta_window_get_geometry (window, &x, &y, &w, &h);
+
+ g_key_file_set_integer (matching_keyfile, role, "x", x);
+ g_key_file_set_integer (matching_keyfile, role, "y", y);
+ g_key_file_set_integer (matching_keyfile, role, "w", w);
+ g_key_file_set_integer (matching_keyfile, role, "h", h);
meta_matching_save_all ();
}