@ -63,6 +63,10 @@ static bool output_set_custom_mode(struct wlr_output *wlr_output,
struct wlr_x11_output * output = get_x11_output_from_output ( wlr_output ) ;
struct wlr_x11_output * output = get_x11_output_from_output ( wlr_output ) ;
struct wlr_x11_backend * x11 = output - > x11 ;
struct wlr_x11_backend * x11 = output - > x11 ;
if ( width = = output - > win_width & & height = = output - > win_height ) {
return true ;
}
const uint32_t values [ ] = { width , height } ;
const uint32_t values [ ] = { width , height } ;
xcb_void_cookie_t cookie = xcb_configure_window_checked (
xcb_void_cookie_t cookie = xcb_configure_window_checked (
x11 - > xcb , output - > win ,
x11 - > xcb , output - > win ,
@ -76,6 +80,9 @@ static bool output_set_custom_mode(struct wlr_output *wlr_output,
return false ;
return false ;
}
}
output - > win_width = width ;
output - > win_height = height ;
// Move the pointer to its new location
// Move the pointer to its new location
update_x11_pointer_position ( output , output - > x11 - > time ) ;
update_x11_pointer_position ( output , output - > x11 - > time ) ;
@ -598,6 +605,9 @@ struct wlr_output *wlr_x11_output_create(struct wlr_backend *backend) {
x11 - > screen - > root , 0 , 0 , wlr_output - > width , wlr_output - > height , 0 ,
x11 - > screen - > root , 0 , 0 , wlr_output - > width , wlr_output - > height , 0 ,
XCB_WINDOW_CLASS_INPUT_OUTPUT , x11 - > visualid , mask , values ) ;
XCB_WINDOW_CLASS_INPUT_OUTPUT , x11 - > visualid , mask , values ) ;
output - > win_width = wlr_output - > width ;
output - > win_height = wlr_output - > height ;
struct {
struct {
xcb_input_event_mask_t head ;
xcb_input_event_mask_t head ;
xcb_input_xi_event_mask_t mask ;
xcb_input_xi_event_mask_t mask ;
@ -659,6 +669,9 @@ void handle_x11_configure_notify(struct wlr_x11_output *output,
return ;
return ;
}
}
output - > win_width = ev - > width ;
output - > win_height = ev - > height ;
struct wlr_output_state state ;
struct wlr_output_state state ;
wlr_output_state_init ( & state ) ;
wlr_output_state_init ( & state ) ;
wlr_output_state_set_custom_mode ( & state , ev - > width , ev - > height , 0 ) ;
wlr_output_state_set_custom_mode ( & state , ev - > width , ev - > height , 0 ) ;