summaryrefslogtreecommitdiff
path: root/libwnck/test-wnck.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2001-10-24 23:14:18 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-10-24 23:14:18 +0000
commit1b33f9f46721f82a42d99cd4cd2947e95b3f8f50 (patch)
tree5682d207372228c76ebe302ab878aeb896236556 /libwnck/test-wnck.c
parentbd2798a0d5ade9f73bba408ae2353348a2858a74 (diff)
downloadlibwnck-1b33f9f46721f82a42d99cd4cd2947e95b3f8f50.tar.gz
hack to work with slightly older GTK as well as HEAD
2001-10-24 Havoc Pennington <hp@redhat.com> * configure.in: hack to work with slightly older GTK as well as HEAD * libwnck/screen.c (wnck_screen_force_update): add function to force immediate reading of screen state, instead of queueing it * libwnck/window.c: add geometry reporting * libwnck/pager.c: pager widget skeleton
Diffstat (limited to 'libwnck/test-wnck.c')
-rw-r--r--libwnck/test-wnck.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/libwnck/test-wnck.c b/libwnck/test-wnck.c
index 5a3b90a..f476157 100644
--- a/libwnck/test-wnck.c
+++ b/libwnck/test-wnck.c
@@ -38,6 +38,8 @@ static void window_workspace_changed_callback (WnckWindow *window,
gpointer data);
static void window_icon_changed_callback (WnckWindow *window,
gpointer data);
+static void window_geometry_changed_callback (WnckWindow *window,
+ gpointer data);
static GtkTreeModel* create_tree_model (void);
static GtkWidget* create_tree_view (void);
@@ -169,7 +171,10 @@ window_opened_callback (WnckScreen *screen,
g_signal_connect (G_OBJECT (window), "icon_changed",
G_CALLBACK (window_icon_changed_callback),
NULL);
-
+ g_signal_connect (G_OBJECT (window), "geometry_changed",
+ G_CALLBACK (window_geometry_changed_callback),
+ NULL);
+
queue_refill_model ();
}
@@ -303,6 +308,18 @@ window_icon_changed_callback (WnckWindow *window,
update_window (global_tree_model, window);
}
+static void
+window_geometry_changed_callback (WnckWindow *window,
+ gpointer data)
+{
+ int x, y, width, height;
+
+ wnck_window_get_geometry (window, &x, &y, &width, &height);
+
+ g_print ("Geometry changed on window '%s': %d,%d %d x %d\n",
+ wnck_window_get_name (window), x, y, width, height);
+}
+
static GtkTreeModel*
create_tree_model (void)
{