ephyr: Don't configure window while responding to configure events

This leads to and endless sequence of window resizes.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Keith Packard 2016-06-14 13:16:03 -07:00
parent fb1edccf3c
commit 235d21670d
3 changed files with 13 additions and 0 deletions

View File

@ -613,7 +613,9 @@ ephyrResizeScreen (ScreenPtr pScreen,
size.width = newwidth;
size.height = newheight;
hostx_size_set_from_configure(TRUE);
ret = ephyrRandRSetConfig (pScreen, screen->randr, 0, &size);
hostx_size_set_from_configure(FALSE);
if (ret) {
RROutputPtr output;

View File

@ -79,6 +79,7 @@ struct EphyrHostXVars {
KdScreenInfo **screens;
long damage_debug_msec;
Bool size_set_from_configure;
};
/* memset ( missing> ) instead of below */
@ -878,6 +879,7 @@ hostx_screen_init(KdScreenInfo *screen,
xallocarray(scrpriv->ximg->stride, buffer_height);
}
if (!HostX.size_set_from_configure)
{
uint32_t mask = XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT;
uint32_t values[2] = {width, height};
@ -1213,6 +1215,12 @@ hostx_load_keymap(KeySymsPtr keySyms, CARD8 *modmap, XkbControlsPtr controls)
return TRUE;
}
void
hostx_size_set_from_configure(Bool ss)
{
HostX.size_set_from_configure = ss;
}
xcb_connection_t *
hostx_get_xcbconn(void)
{

View File

@ -151,6 +151,9 @@ hostx_paint_rect(KdScreenInfo *screen,
Bool
hostx_load_keymap(KeySymsPtr keySyms, CARD8 *modmap, XkbControlsPtr controls);
void
hostx_size_set_from_configure(Bool);
xcb_connection_t *
hostx_get_xcbconn(void);