aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2012-05-18 12:16:23 -0700
committerChad Versace <chad.versace@linux.intel.com>2012-05-23 12:14:40 -0700
commit67e66ef68e11d9de234fb6fd7ee197b4a33d23a1 (patch)
tree4a1809e51f57846214542412a3ebe9b5b3eab6a8
parent2b11a03a6a7c1865c320d3bd9ed0ce89abb382f7 (diff)
downloadwaffle-67e66ef68e11d9de234fb6fd7ee197b4a33d23a1.tar.gz
x11: Add x11_window_show()
This is an incremental step towards the implementation of waffle_window_show(). In order to prevent regressions, the behavior of x11_window_create() is preserved until the implementation of waffle_window_show() is complete for the X11 platforms. That is, x11_window_create() still shows the window. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r--src/waffle/x11/x11.c19
-rw-r--r--src/waffle/x11/x11.h5
2 files changed, 24 insertions, 0 deletions
diff --git a/src/waffle/x11/x11.c b/src/waffle/x11/x11.c
index 276b32b..bdeaae4 100644
--- a/src/waffle/x11/x11.c
+++ b/src/waffle/x11/x11.c
@@ -171,4 +171,23 @@ x11_window_destroy(
return ok;
}
+bool
+x11_window_show(
+ xcb_connection_t *conn,
+ xcb_window_t window)
+{
+ xcb_void_cookie_t cookie;
+ xcb_generic_error_t *error;
+
+ cookie = xcb_map_window_checked(conn, window);
+ error = xcb_request_check(conn, cookie);
+ if (error) {
+ wcore_errorf(WAFFLE_UNKNOWN_ERROR,
+ "xcb_map_window_checked() failed: error=0x%x",
+ error->error_code);
+ }
+
+ return error == NULL;
+}
+
/// @}
diff --git a/src/waffle/x11/x11.h b/src/waffle/x11/x11.h
index f15998a..f953278 100644
--- a/src/waffle/x11/x11.h
+++ b/src/waffle/x11/x11.h
@@ -48,4 +48,9 @@ x11_window_destroy(
xcb_connection_t *conn,
xcb_window_t window);
+bool
+x11_window_show(
+ xcb_connection_t *conn,
+ xcb_window_t window);
+
/// @}