When libwlmessage was called multiple times within a single
program (with the X11 backend), the first window would not
disappear after validation because the main loop was being
exited without a proper destroy call. This also prevented
other windows from showing up. Fixed.
Change-Id: I07836b1de1ca8725a941b9d988e525c11e7740e3
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
struct message_window *message_window = wlmessage->message_window;
Widget form, label, entry, form_b;
struct message_window *message_window = wlmessage->message_window;
Widget form, label, entry, form_b;
XWindowChanges wc;
XSizeHints sh;
WMHints wm_hints;
XWindowChanges wc;
XSizeHints sh;
WMHints wm_hints;
/* main loop */
XtAppMainLoop (wlmessage->app);
/* main loop */
XtAppMainLoop (wlmessage->app);
+ /* last iteration to destroy the window */
+ XtUnrealizeWidget (message_window->window);
+ XtAppNextEvent (wlmessage->app, &ev);
+ XtDispatchEvent (&ev);
+
if (entry) {
XawTextBlock buffer;
XawTextSourceRead (XawTextGetSource(entry), 0, &buffer, 30);
if (entry) {
XawTextBlock buffer;
XawTextSourceRead (XawTextGetSource(entry), 0, &buffer, 30);