X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fprompt.c;h=88c74b68d048baf3519a753303b547be07e4b7c0;hb=2ea60e77c085a724b2ec28273e24e12ece0e84f3;hp=ebefe0ae54d1ddbf6de8c7ca1aa3d4e213ca7a9f;hpb=1e427a3358deeadf8abc326e714ee201fddc43d6;p=chaz%2Fopenbox diff --git a/openbox/prompt.c b/openbox/prompt.c index ebefe0ae..88c74b68 100644 --- a/openbox/prompt.c +++ b/openbox/prompt.c @@ -58,7 +58,7 @@ void prompt_startup(gboolean reconfig) prompt_a_button = RrAppearanceCopy(ob_rr_theme->osd_unpressed_button); prompt_a_focus = RrAppearanceCopy(ob_rr_theme->osd_focused_button); - prompt_a_press = RrAppearanceCopy(ob_rr_theme->osd_pressed_button); + prompt_a_press = RrAppearanceCopy(ob_rr_theme->osd_pressed_button); prompt_a_msg = RrAppearanceCopy(ob_rr_theme->osd_hilite_label); prompt_a_msg->texture[0].data.text.flow = TRUE; @@ -75,11 +75,12 @@ void prompt_startup(gboolean reconfig) void prompt_shutdown(gboolean reconfig) { - GList *it; + GList *it, *next; if (!reconfig) { - for (it = prompt_list; it; it = g_list_next(it)) { + for (it = prompt_list; it; it = next) { ObPrompt *p = it->data; + next = it->next; if (p->cleanup) p->cleanup(p, p->data); } @@ -362,7 +363,7 @@ static void render_button(ObPrompt *self, ObPromptElement *e) { RrAppearance *a; - if (e->pressed && e->hover) a = prompt_a_press; + if (e->hover && e->pressed) a = prompt_a_press; else if (self->focus == e) a = prompt_a_focus; else a = prompt_a_button; @@ -594,7 +595,7 @@ static void prompt_run_callback(ObPrompt *self, gint result) { prompt_ref(self); if (self->func) { - gboolean clean = self->func(self, self->focus->result, self->data); + gboolean clean = self->func(self, result, self->data); if (clean && self->cleanup) self->cleanup(self, self->data); }