Index: uspace/lib/ui/include/types/ui/msgdialog.h
===================================================================
--- uspace/lib/ui/include/types/ui/msgdialog.h	(revision de227abadf3d5757d374f93d6822275c5b090446)
+++ uspace/lib/ui/include/types/ui/msgdialog.h	(revision de227abadf3d5757d374f93d6822275c5b090446)
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2021 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libui
+ * @{
+ */
+/**
+ * @file Message Dialog
+ */
+
+#ifndef _UI_TYPES_MSGDIALOG_H
+#define _UI_TYPES_MSGDIALOG_H
+
+#include <errno.h>
+#include <io/kbd_event.h>
+#include <io/pos_event.h>
+#include <types/ui/wdecor.h>
+
+struct ui_msg_dialog;
+typedef struct ui_msg_dialog ui_msg_dialog_t;
+
+/** Message dialog parameters */
+typedef struct {
+	/** Window caption */
+	const char *caption;
+	/** Message text */
+	const char *text;
+} ui_msg_dialog_params_t;
+
+/** Message dialog callback */
+typedef struct ui_msg_dialog_cb {
+	/** Dialog button was pressed */
+	void (*button)(ui_msg_dialog_t *, void *, unsigned);
+	/** Window closure requested (e.g. via close button) */
+	void (*close)(ui_msg_dialog_t *, void *);
+} ui_msg_dialog_cb_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/ui/include/ui/msgdialog.h
===================================================================
--- uspace/lib/ui/include/ui/msgdialog.h	(revision de227abadf3d5757d374f93d6822275c5b090446)
+++ uspace/lib/ui/include/ui/msgdialog.h	(revision de227abadf3d5757d374f93d6822275c5b090446)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2021 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libui
+ * @{
+ */
+/**
+ * @file Message Dialog
+ */
+
+#ifndef _UI_MSG_DIALOG_H
+#define _UI_MSG_DIALOG_H
+
+#include <errno.h>
+#include <types/ui/msgdialog.h>
+#include <types/ui/ui.h>
+
+extern void ui_msg_dialog_params_init(ui_msg_dialog_params_t *);
+extern errno_t ui_msg_dialog_create(ui_t *, ui_msg_dialog_params_t *,
+    ui_msg_dialog_t **);
+extern void ui_msg_dialog_set_cb(ui_msg_dialog_t *, ui_msg_dialog_cb_t *,
+    void *);
+extern void ui_msg_dialog_destroy(ui_msg_dialog_t *);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/ui/meson.build
===================================================================
--- uspace/lib/ui/meson.build	(revision f3a7b0df8d6e499e8d47eeef3a165498df5ca509)
+++ uspace/lib/ui/meson.build	(revision de227abadf3d5757d374f93d6822275c5b090446)
@@ -39,4 +39,5 @@
 	'src/menubar.c',
 	'src/menuentry.c',
+	'src/msgdialog.c',
 	'src/paint.c',
 	'src/pbutton.c',
@@ -60,4 +61,5 @@
 	'test/menubar.c',
 	'test/menuentry.c',
+	'test/msgdialog.c',
 	'test/paint.c',
 	'test/pbutton.c',
Index: uspace/lib/ui/private/msgdialog.h
===================================================================
--- uspace/lib/ui/private/msgdialog.h	(revision de227abadf3d5757d374f93d6822275c5b090446)
+++ uspace/lib/ui/private/msgdialog.h	(revision de227abadf3d5757d374f93d6822275c5b090446)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2021 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libui
+ * @{
+ */
+/**
+ * @file Message dialog structure
+ *
+ */
+
+#ifndef _UI_PRIVATE_MSGDIALOG_H
+#define _UI_PRIVATE_MSGDIALOG_H
+
+/** Actual structure of message dialog.
+ *
+ * This is private to libui.
+ */
+struct ui_msg_dialog {
+	/** Dialog window */
+	struct ui_window *window;
+	/** OK button */
+	struct ui_pbutton *bok;
+	/** Message dialog callbacks */
+	struct ui_msg_dialog_cb *cb;
+	/** Callback argument */
+	void *arg;
+};
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/ui/src/msgdialog.c
===================================================================
--- uspace/lib/ui/src/msgdialog.c	(revision de227abadf3d5757d374f93d6822275c5b090446)
+++ uspace/lib/ui/src/msgdialog.c	(revision de227abadf3d5757d374f93d6822275c5b090446)
@@ -0,0 +1,229 @@
+/*
+ * Copyright (c) 2021 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libui
+ * @{
+ */
+/**
+ * @file Message dialog
+ */
+
+#include <errno.h>
+#include <mem.h>
+#include <stdlib.h>
+#include <ui/fixed.h>
+#include <ui/label.h>
+#include <ui/msgdialog.h>
+#include <ui/pbutton.h>
+#include <ui/resource.h>
+#include <ui/window.h>
+#include "../private/msgdialog.h"
+
+static void ui_msg_dialog_wnd_close(ui_window_t *, void *);
+
+ui_window_cb_t ui_msg_dialog_wnd_cb = {
+	.close = ui_msg_dialog_wnd_close
+};
+
+static void ui_msg_dialog_btn_clicked(ui_pbutton_t *, void *);
+
+ui_pbutton_cb_t ui_msg_dialog_btn_cb = {
+	.clicked = ui_msg_dialog_btn_clicked
+};
+
+/** Initialize message dialog parameters structure.
+ *
+ * Message dialog parameters structure must always be initialized using
+ * this function first.
+ *
+ * @param params Message dialog parameters structure
+ */
+void ui_msg_dialog_params_init(ui_msg_dialog_params_t *params)
+{
+	memset(params, 0, sizeof(ui_msg_dialog_params_t));
+}
+
+/** Create new message dialog.
+ *
+ * @param ui User interface
+ * @param params Message dialog parameters
+ * @param rdialog Place to store pointer to new dialog
+ * @return EOK on success or an error code
+ */
+errno_t ui_msg_dialog_create(ui_t *ui, ui_msg_dialog_params_t *params,
+    ui_msg_dialog_t **rdialog)
+{
+	errno_t rc;
+	ui_msg_dialog_t *dialog;
+	ui_window_t *window = NULL;
+	ui_wnd_params_t wparams;
+	ui_fixed_t *fixed = NULL;
+	ui_label_t *label = NULL;
+	ui_pbutton_t *bok = NULL;
+	gfx_rect_t rect;
+	ui_resource_t *ui_res;
+
+	dialog = calloc(1, sizeof(ui_msg_dialog_t));
+	if (dialog == NULL) {
+		rc = ENOMEM;
+		goto error;
+	}
+
+	ui_wnd_params_init(&wparams);
+	wparams.caption = params->caption;
+	wparams.rect.p0.x = 0;
+	wparams.rect.p0.y = 0;
+	wparams.rect.p1.x = 200;
+	wparams.rect.p1.y = 110;
+
+	rc = ui_window_create(ui, &wparams, &window);
+	if (rc != EOK)
+		goto error;
+
+	ui_window_set_cb(window, &ui_msg_dialog_wnd_cb, dialog);
+
+	ui_res = ui_window_get_res(window);
+
+	rc = ui_fixed_create(&fixed);
+	if (rc != EOK)
+		goto error;
+
+	rc = ui_label_create(ui_res, params->text, &label);
+	if (rc != EOK)
+		goto error;
+
+	rect.p0.x = 10;
+	rect.p0.y = 35;
+	rect.p1.x = 190;
+	rect.p1.y = 50;
+	ui_label_set_rect(label, &rect);
+	ui_label_set_halign(label, gfx_halign_center);
+
+	rc = ui_fixed_add(fixed, ui_label_ctl(label));
+	if (rc != EOK)
+		goto error;
+
+	label = NULL;
+
+	rc = ui_pbutton_create(ui_res, "OK", &bok);
+	if (rc != EOK)
+		goto error;
+
+	ui_pbutton_set_cb(bok, &ui_msg_dialog_btn_cb, dialog);
+
+	rect.p0.x = 55;
+	rect.p0.y = 60;
+	rect.p1.x = 145;
+	rect.p1.y = 88;
+	ui_pbutton_set_rect(bok, &rect);
+
+	ui_pbutton_set_default(bok, true);
+
+	rc = ui_fixed_add(fixed, ui_pbutton_ctl(bok));
+	if (rc != EOK)
+		goto error;
+
+	bok = NULL;
+
+	ui_window_add(window, ui_fixed_ctl(fixed));
+	fixed = NULL;
+
+	rc = ui_window_paint(window);
+	if (rc != EOK)
+		goto error;
+
+	dialog->window = window;
+	dialog->bok = bok;
+	*rdialog = dialog;
+	return EOK;
+error:
+	if (label != NULL)
+		ui_label_destroy(label);
+	if (fixed != NULL)
+		ui_fixed_destroy(fixed);
+	if (window != NULL)
+		ui_window_destroy(window);
+	if (dialog != NULL)
+		free(dialog);
+	return rc;
+}
+
+/** Destroy message dialog.
+ *
+ * @param dialog Message dialog or @c NULL
+ */
+void ui_msg_dialog_destroy(ui_msg_dialog_t *dialog)
+{
+	if (dialog == NULL)
+		return;
+
+	ui_window_destroy(dialog->window);
+	free(dialog);
+}
+
+/** Set mesage dialog callback.
+ *
+ * @param dialog Message dialog
+ * @param cb Message dialog callbacks
+ * @param arg Callback argument
+ */
+void ui_msg_dialog_set_cb(ui_msg_dialog_t *dialog, ui_msg_dialog_cb_t *cb,
+    void *arg)
+{
+	dialog->cb = cb;
+	dialog->arg = arg;
+}
+
+/** Message dialog window close handler.
+ *
+ * @param window Window
+ * @param arg Argument (ui_msg_dialog_t *)
+ */
+static void ui_msg_dialog_wnd_close(ui_window_t *window, void *arg)
+{
+	ui_msg_dialog_t *dialog = (ui_msg_dialog_t *) arg;
+
+	if (dialog->cb != NULL && dialog->cb->close != NULL)
+		dialog->cb->close(dialog, dialog->arg);
+}
+
+/** Message dialog button click handler.
+ *
+ * @param pbutton Push button
+ * @param arg Argument (ui_msg_dialog_t *)
+ */
+static void ui_msg_dialog_btn_clicked(ui_pbutton_t *pbutton, void *arg)
+{
+	ui_msg_dialog_t *dialog = (ui_msg_dialog_t *) arg;
+
+	if (dialog->cb != NULL && dialog->cb->button != NULL)
+		dialog->cb->button(dialog, dialog->arg, 0);
+}
+
+/** @}
+ */
Index: uspace/lib/ui/test/msgdialog.c
===================================================================
--- uspace/lib/ui/test/msgdialog.c	(revision de227abadf3d5757d374f93d6822275c5b090446)
+++ uspace/lib/ui/test/msgdialog.c	(revision de227abadf3d5757d374f93d6822275c5b090446)
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2021 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <pcut/pcut.h>
+#include <stdbool.h>
+#include <ui/pbutton.h>
+#include <ui/ui.h>
+#include <ui/msgdialog.h>
+#include "../private/msgdialog.h"
+#include "../private/window.h"
+
+PCUT_INIT;
+
+PCUT_TEST_SUITE(msg_dialog);
+
+static void test_dialog_button(ui_msg_dialog_t *, void *, unsigned);
+static void test_dialog_close(ui_msg_dialog_t *, void *);
+
+static ui_msg_dialog_cb_t test_msg_dialog_cb = {
+	.button = test_dialog_button,
+	.close = test_dialog_close
+};
+
+static ui_msg_dialog_cb_t dummy_msg_dialog_cb = {
+};
+
+typedef struct {
+	bool button;
+	unsigned bnum;
+	bool close;
+} test_cb_resp_t;
+
+/** Create and destroy message dialog */
+PCUT_TEST(create_destroy)
+{
+	errno_t rc;
+	ui_t *ui = NULL;
+	ui_msg_dialog_params_t params;
+	ui_msg_dialog_t *dialog = NULL;
+
+	rc = ui_create_disp(NULL, &ui);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	ui_msg_dialog_params_init(&params);
+	params.caption = "Message";
+	params.text = "Hello";
+
+	rc = ui_msg_dialog_create(ui, &params, &dialog);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(dialog);
+
+	ui_msg_dialog_destroy(dialog);
+	ui_destroy(ui);
+}
+
+/** ui_msg_dialog_destroy() can take NULL argument (no-op) */
+PCUT_TEST(destroy_null)
+{
+	ui_msg_dialog_destroy(NULL);
+}
+
+/** Button click invokes callback set via ui_msg_dialog_set_cb() */
+PCUT_TEST(button_cb)
+{
+	errno_t rc;
+	ui_t *ui = NULL;
+	ui_msg_dialog_params_t params;
+	ui_msg_dialog_t *dialog = NULL;
+	test_cb_resp_t resp;
+
+	rc = ui_create_disp(NULL, &ui);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	ui_msg_dialog_params_init(&params);
+	params.caption = "Message";
+	params.text = "Hello";
+
+	rc = ui_msg_dialog_create(ui, &params, &dialog);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(dialog);
+
+	/* Button callback with no callbacks set */
+	ui_pbutton_clicked(dialog->bok);
+
+	/* Button callback with unfocus callback not implemented */
+	ui_msg_dialog_set_cb(dialog, &dummy_msg_dialog_cb, NULL);
+	ui_pbutton_clicked(dialog->bok);
+
+	/* Button callback with real callback set */
+	resp.button = false;
+	resp.bnum = 123;
+	ui_msg_dialog_set_cb(dialog, &test_msg_dialog_cb, &resp);
+	ui_pbutton_clicked(dialog->bok);
+	PCUT_ASSERT_TRUE(resp.button);
+	PCUT_ASSERT_INT_EQUALS(0, resp.bnum);
+
+	ui_msg_dialog_destroy(dialog);
+	ui_destroy(ui);
+}
+
+/** Sending window close request invokes callback set via
+ * ui_msg_dialog_set_cb()
+ */
+PCUT_TEST(close_cb)
+{
+	errno_t rc;
+	ui_t *ui = NULL;
+	ui_msg_dialog_params_t params;
+	ui_msg_dialog_t *dialog = NULL;
+	test_cb_resp_t resp;
+
+	rc = ui_create_disp(NULL, &ui);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	ui_msg_dialog_params_init(&params);
+	params.caption = "Message";
+	params.text = "Hello";
+
+	rc = ui_msg_dialog_create(ui, &params, &dialog);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(dialog);
+
+	/* Button callback with no callbacks set */
+	ui_window_send_close(dialog->window);
+
+	/* Button callback with unfocus callback not implemented */
+	ui_msg_dialog_set_cb(dialog, &dummy_msg_dialog_cb, NULL);
+	ui_window_send_close(dialog->window);
+
+	/* Button callback with real callback set */
+	resp.close = false;
+	ui_msg_dialog_set_cb(dialog, &test_msg_dialog_cb, &resp);
+	ui_window_send_close(dialog->window);
+	PCUT_ASSERT_TRUE(resp.close);
+
+	ui_msg_dialog_destroy(dialog);
+	ui_destroy(ui);
+}
+
+static void test_dialog_button(ui_msg_dialog_t *dialog, void *arg,
+    unsigned bnum)
+{
+	test_cb_resp_t *resp = (test_cb_resp_t *) arg;
+
+	resp->button = true;
+	resp->bnum = bnum;
+}
+
+static void test_dialog_close(ui_msg_dialog_t *dialog, void *arg)
+{
+	test_cb_resp_t *resp = (test_cb_resp_t *) arg;
+
+	resp->close = true;
+}
+
+PCUT_EXPORT(msg_dialog);
