@ -647,11 +647,7 @@ weston_wm_window_transform(struct wl_listener *listener, void *data)
struct weston_wm_window * window = get_wm_window ( surface ) ;
struct weston_wm_window * window = get_wm_window ( surface ) ;
struct weston_wm * wm =
struct weston_wm * wm =
container_of ( listener , struct weston_wm , transform_listener ) ;
container_of ( listener , struct weston_wm , transform_listener ) ;
struct weston_output * output = surface - > output ;
uint32_t mask , values [ 2 ] ;
uint32_t mask , values [ 2 ] ;
float sxf , syf ;
int sx , sy ;
static int old_sx = - 1 , old_sy = - 1 ;
if ( ! window | | ! wm )
if ( ! window | | ! wm )
return ;
return ;
@ -659,24 +655,15 @@ weston_wm_window_transform(struct wl_listener *listener, void *data)
if ( ! weston_surface_is_mapped ( surface ) )
if ( ! weston_surface_is_mapped ( surface ) )
return ;
return ;
weston_surface_to_global_float ( surface , output - > x , output - > y ,
if ( window - > x ! = surface - > geometry . x | |
& sxf , & syf ) ;
window - > y ! = surface - > geometry . y ) {
values [ 0 ] = surface - > geometry . x ;
values [ 1 ] = surface - > geometry . y ;
mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y ;
sx = ( int ) sxf ;
xcb_configure_window ( wm - > conn , window - > frame_id , mask , values ) ;
sy = ( int ) syf ;
xcb_flush ( wm - > conn ) ;
}
if ( old_sx = = sx & & old_sy = = sy )
return ;
values [ 0 ] = sx ;
values [ 1 ] = sy ;
mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y ;
xcb_configure_window ( wm - > conn , window - > frame_id , mask , values ) ;
xcb_flush ( wm - > conn ) ;
old_sx = sx ;
old_sy = sy ;
}
}
# define ICCCM_WITHDRAWN_STATE 0
# define ICCCM_WITHDRAWN_STATE 0