*/
#include <config.h>
-#include FORMS_H_LOCATION
+#include "lyx_forms.h"
#include "combox.h"
#include "freebrowser.h"
case FL_DRAW:
attrib_change(ob->spec);
/* Fall through */
- case FL_DRAWLABEL:
+ case FL_DRAWLABEL: {
+ COMBOX_SPEC * sp = ob->spec;
+
+ int change =
+ ob->x != sp->button_chosen->x ||
+ ob->y != sp->button_chosen->y;
+
+ FL_Coord xbs = 0;
+ if (sp->button_state) {
+ xbs = ob->x + (sp->button_state->x - sp->button_chosen->x);
+ change = change ||
+ xbs != sp->button_state->x ||
+ ob->y != sp->button_state->y;
+ }
+
+ if (change) {
+ fl_freeze_form(ob->form);
+ fl_set_object_position(sp->button_chosen, ob->x, ob->y);
+ if (sp->button_state)
+ fl_set_object_position(sp->button_state, xbs, ob->y);
+ fl_unfreeze_form(ob->form);
+ }
+
fl_draw_object_label(ob);
- break;
- case FL_SHORTCUT:
+ break;
+ } case FL_SHORTCUT:
show_browser(ob->spec);
break;
case FL_FREEMEM: {