X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus_cycle_popup.c;h=096f5c6375077ce4591a034d7c964a07d0da9b8c;hb=5f04ca85ef6a2ebc2d66842e261a676691e9b4de;hp=98998c88950396dca7de6b23473adde1bf5f9ef1;hpb=e2ddfaf9fff1fb9dd6ebdc1a95f2b228d6baedb2;p=chaz%2Fopenbox diff --git a/openbox/focus_cycle_popup.c b/openbox/focus_cycle_popup.c index 98998c88..096f5c63 100644 --- a/openbox/focus_cycle_popup.c +++ b/openbox/focus_cycle_popup.c @@ -98,7 +98,7 @@ void focus_cycle_popup_startup(gboolean reconfig) single_popup = icon_popup_new(); - popup.obwin.type = Window_Internal; + popup.obwin.type = OB_WINDOW_CLASS_INTERNAL; popup.a_bg = RrAppearanceCopy(ob_rr_theme->osd_hilite_bg); popup.a_text = RrAppearanceCopy(ob_rr_theme->osd_hilite_label); popup.a_icon = RrAppearanceCopy(ob_rr_theme->a_clear_tex); @@ -113,8 +113,7 @@ void focus_cycle_popup_startup(gboolean reconfig) attrib.override_redirect = True; attrib.border_pixel=RrColorPixel(ob_rr_theme->osd_border_color); - popup.bg = create_window(RootWindow(obt_display, ob_screen), - ob_rr_theme->obwidth, + popup.bg = create_window(obt_root(ob_screen), ob_rr_theme->obwidth, CWOverrideRedirect | CWBorderPixel, &attrib); popup.text = create_window(popup.bg, 0, 0, NULL); @@ -128,14 +127,14 @@ void focus_cycle_popup_startup(gboolean reconfig) XMapWindow(obt_display, popup.text); stacking_add(INTERNAL_AS_WINDOW(&popup)); - g_hash_table_insert(window_map, &popup.bg, &popup); + window_add(&popup.bg, INTERNAL_AS_WINDOW(&popup)); } void focus_cycle_popup_shutdown(gboolean reconfig) { icon_popup_free(single_popup); - g_hash_table_remove(window_map, &popup.bg); + window_remove(popup.bg); stacking_remove(INTERNAL_AS_WINDOW(&popup)); while(popup.targets) { @@ -481,6 +480,7 @@ void focus_cycle_popup_hide(void) g_free(t->text); XDestroyWindow(obt_display, t->win); + g_free(t); popup.targets = g_list_delete_link(popup.targets, popup.targets); }