summaryrefslogtreecommitdiff
path: root/openbox/menuframe.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-01-20 02:56:12 -0500
committerDana Jansens <danakj@orodu.net>2008-01-31 12:25:30 -0500
commit29637976e6aecf45bae84ba9ce3ecb26635012f7 (patch)
treee1fc7cf42223214e6465f9f0d96dc645bb30cf70 /openbox/menuframe.c
parentea481338b5f16fd81a7b33e036ead39b918a51af (diff)
make the window.h interface more consistent with the rest of openbox, hide the window_map behind some functions, and make obdockapps not obwindows anymore
Diffstat (limited to 'openbox/menuframe.c')
-rw-r--r--openbox/menuframe.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/openbox/menuframe.c b/openbox/menuframe.c
index f8f0a6bc..2abb82c6 100644
--- a/openbox/menuframe.c
+++ b/openbox/menuframe.c
@@ -77,7 +77,7 @@ ObMenuFrame* menu_frame_new(ObMenu *menu, guint show_from, ObClient *client)
XSetWindowAttributes attr;
self = g_new0(ObMenuFrame, 1);
- self->type = Window_Menu;
+ self->type = OB_WINDOW_CLASS_MENUFRAME;
self->menu = menu;
self->selected = NULL;
self->client = client;
@@ -95,7 +95,8 @@ ObMenuFrame* menu_frame_new(ObMenu *menu, guint show_from, ObClient *client)
self->a_title = RrAppearanceCopy(ob_rr_theme->a_menu_title);
self->a_items = RrAppearanceCopy(ob_rr_theme->a_menu);
- stacking_add(MENU_AS_WINDOW(self));
+ window_add(&self->window, MENUFRAME_AS_WINDOW(self));
+ stacking_add(MENUFRAME_AS_WINDOW(self));
return self;
}
@@ -108,7 +109,8 @@ void menu_frame_free(ObMenuFrame *self)
self->entries = g_list_delete_link(self->entries, self->entries);
}
- stacking_remove(MENU_AS_WINDOW(self));
+ stacking_remove(MENUFRAME_AS_WINDOW(self));
+ window_remove(self->window);
XDestroyWindow(obt_display, self->window);
@@ -179,6 +181,8 @@ static ObMenuEntryFrame* menu_entry_frame_new(ObMenuEntry *entry,
self->a_text_title =
RrAppearanceCopy(ob_rr_theme->a_menu_text_title);
+ window_add(&self->window, MENUFRAME_AS_WINDOW(self->frame));
+
return self;
}
@@ -187,6 +191,8 @@ static void menu_entry_frame_free(ObMenuEntryFrame *self)
if (self) {
menu_entry_unref(self->entry);
+ window_remove(self->window);
+
XDestroyWindow(obt_display, self->text);
XDestroyWindow(obt_display, self->window);
g_hash_table_remove(menu_frame_map, &self->text);