libweston-desktop: popup not shown until mouse moves with weston-stacking
@rawoul
Submitted by Arnaud Vrac Assigned to Quentin 'SardemFF7' Glidic @sardemff7
Description
Since libweston-desktop introduction, the weston-stacking example client does not work correctly: after right-clicking, the popup does not show until the mouse is moved, or next repaint.
Note this does not seem to happen in the X11 backend, I can only reproduce it in the DRM backend. I think the issue is happening because a weston_view_update_transform is now missing, and a repaint is not scheduled after the popup view is setup. It probably works in the X11 backend because of the repaint happens later than in the DRM backend.
Here are the WAYLAND_DEBUG compositor log when pressing the right click button:
- Before libweston-desktop introduction:
[3022196.051] -> wl_pointer@18.button(30, 2383514, 273, 1)
[3022196.150] -> wl_pointer@18.frame()
[3022198.890] wl_compositor@4.create_surface(new id wl_surface@22)
[3022198.984] wl_surface@22.set_buffer_scale(1)
[3022199.000] wl_surface@22.set_buffer_transform(0)
[3022199.017] xdg_shell@14.get_xdg_popup(new id xdg_popup@21, wl_surface@22, wl_surface@15, wl_seat@10, 30, 101, 165)
[3022199.124] wl_compositor@4.create_region(new id wl_region@24)
[3022199.162] wl_shm@9.create_pool(new id wl_shm_pool@25, fd 37, 128064)
[3022199.220] wl_shm_pool@25.create_buffer(new id wl_buffer@26, 0, 276, 116, 1104, 0)
[3022199.295] wl_surface@22.frame(new id wl_callback@27)
[3022199.333] wl_surface@22.set_opaque_region(wl_region@24)
[3022199.397] wl_region@24.destroy()
[3022199.428] -> wl_display@1.delete_id(24)
[3022199.455] wl_surface@22.attach(wl_buffer@26, 0, 0)
[3022199.528] wl_surface@22.damage(0, 0, 276, 116)
[3022199.558] wl_surface@22.commit()
[3022199.609] -> wl_surface@22.enter(wl_output@13)
[3022199.654] -> xdg_shell@14.ping(31)
[3022199.914] xdg_shell@14.pong(31)
[3022201.523] -> wl_buffer@26.release()
[3022202.007] -> wl_pointer@18.leave(32, wl_surface@15)
[3022202.057] -> wl_pointer@18.frame()
[3022202.077] -> wl_pointer@18.enter(33, wl_surface@22, 38.437500, 38.878906)
[3022202.104] -> wl_pointer@18.frame()
[3022202.140] -> xdg_shell@14.ping(34)
[3022202.160] -> wl_callback@27.done(2383520)
[3022202.183] -> wl_display@1.delete_id(27)
[3022203.503] wl_surface@12.attach(wl_buffer@23, 0, 0)
[3022203.551] wl_surface@12.damage(0, 0, 10, 16)
[3022203.576] wl_surface@12.commit()
[3022203.673] wl_pointer@18.set_cursor(33, wl_surface@12, 1, 1)
[3022203.730] xdg_shell@14.pong(34)
[3022203.787] wl_surface@22.frame(new id wl_callback@27)
[3022203.835] wl_surface@22.attach(wl_buffer@26, 0, 0)
[3022203.856] wl_surface@22.damage(0, 0, 276, 116)
[3022203.913] wl_surface@22.commit()
[3022217.886] -> wl_buffer@26.release()
[3022218.750] -> xdg_shell@14.ping(35)
[3022218.792] -> wl_callback@27.done(2383537)
[3022218.813] -> wl_display@1.delete_id(27)
[3022219.523] xdg_shell@14.pong(35)
[3022316.048] -> wl_pointer@18.button(35, 2383634, 273, 0)
[3022316.149] -> wl_pointer@18.frame()
- After libweston-desktop introduction:
[3227804.087] -> wl_pointer@18.button(14, 2589122, 273, 1)
[3227804.157] -> wl_pointer@18.frame()
[3227805.301] wl_compositor@4.create_surface(new id wl_surface@25)
[3227805.541] wl_surface@25.set_buffer_scale(1)
[3227805.656] wl_surface@25.set_buffer_transform(0)
[3227805.739] zxdg_shell_v6@14.get_xdg_surface(new id zxdg_surface_v6@26, wl_surface@25)
[3227805.813] zxdg_shell_v6@14.create_positioner(new id zxdg_positioner_v6@27)
[3227805.855] zxdg_positioner_v6@27.set_anchor_rect(60, 162, 1, 1)
[3227805.906] zxdg_positioner_v6@27.set_anchor(5)
[3227805.940] zxdg_positioner_v6@27.set_gravity(10)
[3227805.960] zxdg_surface_v6@26.get_popup(new id zxdg_popup_v6@28, zxdg_surface_v6@16, zxdg_positioner_v6@27)
[3227805.994] zxdg_positioner_v6@27.destroy()
[3227806.008] -> wl_display@1.delete_id(27)
[3227806.050] zxdg_popup_v6@28.grab(wl_seat@10, 14)
[3227806.103] -> wl_pointer@18.leave(15, wl_surface@15)
[3227806.126] -> wl_pointer@18.frame()
[3227806.175] wl_surface@25.commit()
[3227806.214] -> zxdg_popup_v6@28.configure(60, 162, 0, 0)
[3227806.276] -> zxdg_surface_v6@26.configure(16)
[3227808.461] zxdg_surface_v6@26.ack_configure(16)
[3227808.503] wl_compositor@4.create_region(new id wl_region@27)
[3227808.529] wl_shm@9.create_pool(new id wl_shm_pool@29, fd 39, 128064)
[3227808.619] wl_shm_pool@29.create_buffer(new id wl_buffer@30, 0, 276, 116, 1104, 0)
[3227808.676] wl_surface@25.frame(new id wl_callback@31)
[3227808.719] zxdg_surface_v6@26.set_window_geometry(0, 0, 276, 116)
[3227808.815] wl_surface@25.set_opaque_region(wl_region@27)
[3227808.856] wl_region@27.destroy()
[3227808.882] -> wl_display@1.delete_id(27)
[3227808.917] wl_surface@25.attach(wl_buffer@30, 0, 0)
[3227808.977] wl_surface@25.damage(0, 0, 276, 116)
[3227809.007] wl_surface@25.commit()
(Mouse move or update to the panel clock, triggering a repaint)
[3235420.091] -> wl_pointer@18.enter(17, wl_surface@15, 129.769531, 232.375000)
[3235420.166] -> wl_pointer@18.frame()
[3235420.187] -> zxdg_shell_v6@14.ping(18)
[3235420.201] -> wl_pointer@18.motion(2596738, 129.769531, 232.375000)
[3235420.228] -> wl_pointer@18.frame()
[3235420.282] -> wl_surface@25.enter(wl_output@13)
[3235420.888] -> wl_buffer@30.release()
[3235421.592] -> wl_pointer@18.leave(19, wl_surface@15)
[3235421.652] -> wl_pointer@18.frame()
[3235421.671] -> wl_pointer@18.enter(20, wl_surface@25, 37.769531, 38.375000)
[3235421.697] -> wl_pointer@18.frame()
[3235421.711] -> wl_callback@31.done(2596727)
[3235421.726] -> wl_display@1.delete_id(31)
[3235423.901] wl_surface@12.attach(wl_buffer@21, 0, 0)
[3235423.983] wl_surface@12.damage(0, 0, 10, 16)
[3235424.022] wl_surface@12.commit()
[3235424.052] wl_pointer@18.set_cursor(17, wl_surface@12, 1, 1)
[3235424.131] zxdg_shell_v6@14.pong(18)
[3235424.184] wl_surface@12.attach(wl_buffer@21, 0, 0)
[3235424.211] wl_surface@12.damage(0, 0, 10, 16)
[3235424.239] wl_surface@12.commit()
[3235424.283] wl_pointer@18.set_cursor(20, wl_surface@12, 1, 1)
[3235424.344] wl_surface@25.frame(new id wl_callback@31)
[3235424.379] wl_surface@25.attach(wl_buffer@30, 0, 0)
[3235424.404] wl_surface@25.damage(0, 0, 276, 116)
[3235424.462] wl_surface@25.commit()
[3235424.854] -> wl_buffer@30.release()
[3235425.565] -> wl_callback@31.done(2596744)
[3235425.599] -> wl_display@1.delete_id(31)