xwayland: Fix fullscreen mode

With xdg_shell wl_shell starting to diverge in how they work, there's
less shared code in set_fullscreen().  The problem is that the xwayland
window manager calls into set_fulscreen() which now doesn't complete
the fullscreen transition.  Add shell_interface_set_fullscreen() for
the shell interface set_fullscreen hook to use.

https://bugs.freedesktop.org/show_bug.cgi?id=78230
This commit is contained in:
Kristian Høgsberg 2014-05-04 13:47:06 -07:00
parent d7d71e8d96
commit 4779241516
1 changed files with 14 additions and 1 deletions

View File

@ -2797,6 +2797,19 @@ set_xwayland(struct shell_surface *shsurf, int x, int y, uint32_t flags)
shsurf->state_changed = true; shsurf->state_changed = true;
} }
static void
shell_interface_set_fullscreen(struct shell_surface *shsurf,
uint32_t method,
uint32_t framerate,
struct weston_output *output)
{
surface_clear_next_states(shsurf);
set_fullscreen(shsurf, method, framerate, output);
shsurf->next_state.fullscreen = true;
shsurf->state_changed = true;
}
static int static int
shell_interface_move(struct shell_surface *shsurf, struct weston_seat *ws) shell_interface_move(struct shell_surface *shsurf, struct weston_seat *ws)
{ {
@ -6113,7 +6126,7 @@ module_init(struct weston_compositor *ec,
ec->shell_interface.get_primary_view = get_primary_view; ec->shell_interface.get_primary_view = get_primary_view;
ec->shell_interface.set_toplevel = set_toplevel; ec->shell_interface.set_toplevel = set_toplevel;
ec->shell_interface.set_transient = set_transient; ec->shell_interface.set_transient = set_transient;
ec->shell_interface.set_fullscreen = set_fullscreen; ec->shell_interface.set_fullscreen = shell_interface_set_fullscreen;
ec->shell_interface.set_xwayland = set_xwayland; ec->shell_interface.set_xwayland = set_xwayland;
ec->shell_interface.move = shell_interface_move; ec->shell_interface.move = shell_interface_move;
ec->shell_interface.resize = surface_resize; ec->shell_interface.resize = surface_resize;