Skip to content

Commit f227edd

Browse files
hideyukn88Hideyuki Nagase
andauthored
resync window zorder with RDP client at reconnection (#157)
Co-authored-by: Hideyuki Nagase <hideyukn@HIDEYUKN-SB3>
1 parent 4938036 commit f227edd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

libweston/backend-rdp/rdprail.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3711,7 +3711,7 @@ rdp_rail_sync_window_status(freerdp_peer *client)
37113711

37123712
peer_ctx->activationRailCompleted = true;
37133713

3714-
wl_list_for_each(view, &b->compositor->view_list, link) {
3714+
wl_list_for_each_reverse(view, &b->compositor->view_list, link) {
37153715
struct weston_surface *surface = view->surface;
37163716
struct weston_subsurface *sub;
37173717
struct weston_surface_rail_state *rail_state = surface->backend_state;
@@ -3722,7 +3722,7 @@ rdp_rail_sync_window_status(freerdp_peer *client)
37223722
if (rail_state && rail_state->window_id) {
37233723
if (api && api->request_window_icon)
37243724
api->request_window_icon(surface);
3725-
wl_list_for_each(sub, &surface->subsurface_list, parent_link) {
3725+
wl_list_for_each_reverse(sub, &surface->subsurface_list, parent_link) {
37263726
struct weston_surface_rail_state *sub_rail_state = sub->surface->backend_state;
37273727
if (sub->surface == surface)
37283728
continue;
@@ -3734,8 +3734,10 @@ rdp_rail_sync_window_status(freerdp_peer *client)
37343734
}
37353735
}
37363736

3737-
/* this assume repaint to be scheduled on idle loop, not directly from here */
37383737
if (anyWindowCreated) {
3738+
/* resync window zorder with RDP client */
3739+
peer_ctx->is_window_zorder_dirty = true;
3740+
/* this assume repaint to be scheduled on idle loop, not directly from here */
37393741
weston_compositor_wake(b->compositor);
37403742
weston_compositor_damage_all(b->compositor);
37413743
}

0 commit comments

Comments
 (0)