diff options
author | Manuel Bachmann <manuel.bachmann@open.eurogiciel.org> | 2015-02-13 17:14:47 +0100 |
---|---|---|
committer | Manuel Bachmann <manuel.bachmann@open.eurogiciel.org> | 2015-02-13 17:14:47 +0100 |
commit | 65ae4ac8844bd1eb0baab85dd210929ffd34e2b8 (patch) | |
tree | 69b3858ab920076b963963464d3f221774e0d2c3 | |
parent | 8b80a7ea57d818510ef386e296676b3356aecbf5 (diff) | |
download | libwlmessage-65ae4ac8844bd1eb0baab85dd210929ffd34e2b8.tar.gz libwlmessage-65ae4ac8844bd1eb0baab85dd210929ffd34e2b8.tar.bz2 libwlmessage-65ae4ac8844bd1eb0baab85dd210929ffd34e2b8.zip |
X11 backend: fix window behavior with multiple show() callsHEADtizen_3.0.m2.a1_tv_releasetizen_3.0.m2.a1_mobile_releasetizen_3.0.m1_tv_releasetizen_3.0.m1_mobile_releasesubmit/tizen_wearable/20150227.000000submit/tizen_tv/20150323.050640submit/tizen_tv/20150320.000002submit/tizen_mobile/20150223.000001submit/tizen_ivi/20160217.000006submit/tizen_ivi/20160217.000000submit/tizen_common/20151019.135620submit/tizen_common/20151015.190624submit/tizen_common/20150213.162204submit/tizen_3.0.2014.q4_common/20150224.000000accepted/tizen/wearable/20150227.064231accepted/tizen/tv/20150324.014557accepted/tizen/mobile/20150224.002814accepted/tizen/ivi/20160218.025319accepted/tizen/common/20150216.085308accepted/tizen/3.0.2014.q4/common/20150224.150710tizen_3.0.m1_tvtizen_3.0.m1_mobiletizen_3.0.2015.q2_commontizen_3.0.2015.q1_commontizen_3.0.2014.q4_commontizenaccepted/tizen_wearableaccepted/tizen_tvaccepted/tizen_mobileaccepted/tizen_iviaccepted/tizen_commonaccepted/tizen_3.0.2014.q4_common
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>
-rw-r--r-- | libwlmessage-x11.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libwlmessage-x11.c b/libwlmessage-x11.c index 5714334..df2646b 100644 --- a/libwlmessage-x11.c +++ b/libwlmessage-x11.c @@ -664,6 +664,7 @@ wlmessage_show (struct wlmessage *wlmessage, char **input_text) struct message_window *message_window = wlmessage->message_window; Widget form, label, entry, form_b; + XEvent ev; XWindowChanges wc; XSizeHints sh; WMHints wm_hints; @@ -804,6 +805,11 @@ form: /* 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); |