summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2014-03-26 20:43:45 +0000
committerJon TURNEY <jon.turney@dronecode.org.uk>2014-03-27 18:05:48 +0000
commite695be5854917eb6400efe2e6265c1f568a3a175 (patch)
treeaba3fedc1caec14546f0cb9d3e356213ecb8aaf4
parentb8991a555974aca798b5055960d1f5bd9397dd0f (diff)
Fix Xephyr initial window sizing when run without a window manager
Conversion to xcb dropped a XResizeWindow() from hostx_scren_init(), so now Xephyr assumes that it will receive a XCB_CONFIGURE_NOTIFY with the window's initial placement after the window is mapped. This assumption is not true when running without a WM, or when the WM is deficient. Restore setting the window size before it is mapped to ensure the window gets sized correctly. See fd.o bug #74849 https://bugs.freedesktop.org/show_bug.cgi?id=74849 Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
-rw-r--r--hw/kdrive/ephyr/hostx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index 3e01a4770..d78b405aa 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -695,6 +695,12 @@ hostx_screen_init(KdScreenInfo *screen,
malloc(scrpriv->ximg->stride * buffer_height);
}
+ {
+ const uint32_t mask = XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT;
+ const uint32_t values[] = { width, height };
+ xcb_configure_window(HostX.conn, scrpriv->win, mask, values);
+ }
+
if (scrpriv->win_pre_existing == None && !EphyrWantResize) {
/* Ask the WM to keep our size static */
xcb_size_hints_t size_hints = {0};