@ -875,7 +875,7 @@ static const struct wlr_surface_role xwayland_surface_role = {
. destroy = xwayland_surface_role_destroy ,
. destroy = xwayland_surface_role_destroy ,
} ;
} ;
static void xw m_map_shell_surfac e( struct wlr_xwm * xwm ,
static void xw ayland_surface_associat e( struct wlr_xwm * xwm ,
struct wlr_xwayland_surface * xsurface , struct wlr_surface * surface ) {
struct wlr_xwayland_surface * xsurface , struct wlr_surface * surface ) {
if ( ! wlr_surface_set_role ( surface , & xwayland_surface_role , xsurface ,
if ( ! wlr_surface_set_role ( surface , & xwayland_surface_role , xsurface ,
NULL , 0 ) ) {
NULL , 0 ) ) {
@ -1112,7 +1112,7 @@ static void xwm_handle_surface_id_message(struct wlr_xwm *xwm,
if ( resource ) {
if ( resource ) {
struct wlr_surface * surface = wlr_surface_from_resource ( resource ) ;
struct wlr_surface * surface = wlr_surface_from_resource ( resource ) ;
xsurface - > surface_id = 0 ;
xsurface - > surface_id = 0 ;
xw m_map_shell_surfac e( xwm , xsurface , surface ) ;
xw ayland_surface_associat e( xwm , xsurface , surface ) ;
} else {
} else {
xsurface - > surface_id = id ;
xsurface - > surface_id = id ;
wl_list_remove ( & xsurface - > unpaired_link ) ;
wl_list_remove ( & xsurface - > unpaired_link ) ;
@ -1142,7 +1142,7 @@ static void xwm_handle_surface_serial_message(struct wlr_xwm *xwm,
struct wlr_surface * surface = wlr_xwayland_shell_v1_surface_from_serial (
struct wlr_surface * surface = wlr_xwayland_shell_v1_surface_from_serial (
xwm - > xwayland - > shell_v1 , xsurface - > serial ) ;
xwm - > xwayland - > shell_v1 , xsurface - > serial ) ;
if ( surface ! = NULL ) {
if ( surface ! = NULL ) {
xw m_map_shell_surfac e( xwm , xsurface , surface ) ;
xw ayland_surface_associat e( xwm , xsurface , surface ) ;
} else {
} else {
wl_list_remove ( & xsurface - > unpaired_link ) ;
wl_list_remove ( & xsurface - > unpaired_link ) ;
wl_list_insert ( & xwm - > unpaired_surfaces , & xsurface - > unpaired_link ) ;
wl_list_insert ( & xwm - > unpaired_surfaces , & xsurface - > unpaired_link ) ;
@ -1672,7 +1672,7 @@ static void handle_compositor_new_surface(struct wl_listener *listener,
struct wlr_xwayland_surface * xsurface ;
struct wlr_xwayland_surface * xsurface ;
wl_list_for_each ( xsurface , & xwm - > unpaired_surfaces , unpaired_link ) {
wl_list_for_each ( xsurface , & xwm - > unpaired_surfaces , unpaired_link ) {
if ( xsurface - > surface_id = = surface_id ) {
if ( xsurface - > surface_id = = surface_id ) {
xw m_map_shell_surfac e( xwm , xsurface , surface ) ;
xw ayland_surface_associat e( xwm , xsurface , surface ) ;
xcb_flush ( xwm - > xcb_conn ) ;
xcb_flush ( xwm - > xcb_conn ) ;
return ;
return ;
}
}
@ -1697,7 +1697,7 @@ static void handle_shell_v1_new_surface(struct wl_listener *listener,
struct wlr_xwayland_surface * xsurface ;
struct wlr_xwayland_surface * xsurface ;
wl_list_for_each ( xsurface , & xwm - > unpaired_surfaces , unpaired_link ) {
wl_list_for_each ( xsurface , & xwm - > unpaired_surfaces , unpaired_link ) {
if ( xsurface - > serial = = shell_surface - > serial ) {
if ( xsurface - > serial = = shell_surface - > serial ) {
xw m_map_shell_surfac e( xwm , xsurface , shell_surface - > surface ) ;
xw ayland_surface_associat e( xwm , xsurface , shell_surface - > surface ) ;
return ;
return ;
}
}
}
}