summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2002-05-11 04:44:34 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-05-11 04:44:34 +0000
commit9598affa0375aac9e9057522b1a0138fa1897552 (patch)
tree550e69f1ba4f0cc5d1bf9b250d531edf0f9ffaae /src/tools
parent2679d3cf00512374a0e35953c0be6ffa556f044a (diff)
downloadmetacity-9598affa0375aac9e9057522b1a0138fa1897552.tar.gz
add override redirect test window
2002-05-10 Havoc Pennington <hp@pobox.com> * src/tools/metacity-window-demo.c: add override redirect test window * src/stack.c (raise_window_relative_to_managed_windows): new function, used to avoid moving windows above override redirect popup windows. * src/display.c (event_callback): don't lower panels on LeaveNotify if they have focus, #70895
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/metacity-window-demo.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/tools/metacity-window-demo.c b/src/tools/metacity-window-demo.c
index 73b27c47..825f6b75 100644
--- a/src/tools/metacity-window-demo.c
+++ b/src/tools/metacity-window-demo.c
@@ -310,6 +310,28 @@ menu_cb (gpointer callback_data,
gtk_widget_show_all (window);
}
+static void
+override_redirect_cb (gpointer callback_data,
+ guint callback_action,
+ GtkWidget *widget)
+{
+ GtkWidget *window;
+ GtkWidget *vbox;
+ GtkWidget *label;
+
+ window = gtk_window_new (GTK_WINDOW_POPUP);
+ gtk_window_set_title (GTK_WINDOW (window), "Override Redirect");
+
+ vbox = gtk_vbox_new (FALSE, 0);
+
+ gtk_container_add (GTK_CONTAINER (window), vbox);
+
+ label = gtk_label_new ("This is an override\nredirect window\nand should not be managed");
+ gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
+
+ gtk_widget_show_all (window);
+}
+
static gboolean
focus_in_event_cb (GtkWidget *window,
GdkEvent *event,
@@ -522,7 +544,8 @@ static GtkItemFactoryEntry menu_items[] =
{ "/Windows/_All docks", NULL, dock_cb, DOCK_ALL, NULL },
{ "/Windows/Des_ktop", NULL, desktop_cb, 0, NULL },
{ "/Windows/Me_nu", NULL, menu_cb, 0, NULL },
- { "/Windows/Tool_bar", NULL, toolbar_cb, 0, NULL }
+ { "/Windows/Tool_bar", NULL, toolbar_cb, 0, NULL },
+ { "/Windows/Override Redirect", NULL, override_redirect_cb, 0, NULL }
};
static void