GNOME Bugzilla – Bug 791938
Add xdg-shell (stable) support
Last modified: 2018-01-29 08:53:57 UTC
The last patch adds support for xdg-shell (stable). The patches prior to that one are variosu clean ups and preparations.
Created attachment 365950 [details] [review] .gitignore: Add more things to ignore Various protocol files had not been added.
Created attachment 365951 [details] [review] src/Makefile.am: Remove redundant rule The rules above handle all unstable protocols from Wayland protocol, so no need to add per protocol rules.
Created attachment 365952 [details] [review] wayland: Shorten MetaWaylandSurfaceRoleShellSurface name It was annoyingly long, so rename it to MetaWaylandShellSurface.
Created attachment 365953 [details] [review] wayland/xdg-shell: Cleanup object class interface vfunc names Follow the convention that MetaSomeObject's class vfuncs should be named meta_some_object_said_vfunc.
Created attachment 365954 [details] [review] wayland/xdg-shell: Cleanup xdg_positioner Wayland vfunc naming Use the convention [interface]_[request] (..) used elsewhere in the file.
Created attachment 365955 [details] [review] wayland/xdg-shell: Minor cosmetic cleanups
Created attachment 365956 [details] [review] wayland/surface: Stop using deprecated g_object_newv Replace it with g_object_new_with_properties. This fixes a warning about using deprecated API.
Created attachment 365957 [details] [review] wayland: Restructure surface role building blocks code This commit moves out non-core wl_surface related code into separate code units, while renaming types to fit a common scheme. The changes done are: * ClutterActor based surface roles built upon MetaWalyandSurfaceRoleActorSurface. This object has been renamed to MetaWaylandActorSurface and related functionality has moved into meta-wayland-actor-surface.c. * The code related to roles backed by a MetaWindow (i.e. built upon MetaWaylandShellSurface) was moved into meta-wayland-shell-surface.c * The majority of subsurface related code was moved into into meta-wayland-subsurface.c and the object was renamed MetaWaylandSubsurface.
Created attachment 365958 [details] [review] xwayland: Base Xwayland surface role object on the actor role The Xwayland role uses a MetaSurfaceActorWayland just so lets share logic related to it. As a side effect, wl_surface.enter/leave starts working for Xwayland surfaces.
Created attachment 365959 [details] [review] surface-actor/wayland: Minor style fixes
Created attachment 365960 [details] [review] wayland: Push actor state instead of itself pulling Make the Wayland objects push the state relevant to their role to the MetaSurfaceActor instead of MetaSurfaceActorWayland pulling the state from the associated surface. This makes the relationship between the actor and the objects that constructs it more clear; the actor is a drawable that the protocol objects control, not the other way around. This will make it easier to "detach" a surface actor from a surface, which is necessary when unmapping a window while the underlying surface is yet to be destroyed and potentially reused.
Created attachment 365961 [details] [review] wayland: Use helper to set shell surface window The helper deals with updating the surface output state.
Created attachment 365962 [details] [review] wayland: Add support for stable xdg-shell This commit adds support for xdg_shell (the stable version). This was done by first copying the old xdg-shell unstable v6 implementation into a separate .c .h file pair (including various symbol renaming) then porting the old xdg-shell unstable v6 implementation to the new stable version.
As discussed on IRC, I get a crash when running Kodi. It occurs both when using zxdg_shell_unstable_v6 with the same Kodi code that works on master as well as when using the new xdg_wm_base code (have not tested wl_shell). I'll attach the backtrace.
+ Trace 238322
Created attachment 366643 [details] Log of running kodi with WAYLAND_DEBUG=1
Sorry, seems there was some confusion. To be clear: There is no crash on mutter master when using zxdg_shell_unstable_v6. It is definitely introduced by the patches here.
I created this merge request instead: https://gitlab.gnome.org/GNOME/mutter/merge_requests/5 So closing this one. (In reply to k.philipp from comment #17) > Sorry, seems there was some confusion. To be clear: There is no crash on > mutter master when using zxdg_shell_unstable_v6. It is definitely introduced > by the patches here. I think I have fixed the issue you reported. Do you have any chance to git the MR a test run?