diff options
Diffstat (limited to 'src/shell.c')
-rw-r--r-- | src/shell.c | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/src/shell.c b/src/shell.c index 368fa5b7..72d2a73f 100644 --- a/src/shell.c +++ b/src/shell.c | |||
@@ -1754,17 +1754,15 @@ shell_map_fullscreen(struct shell_surface *shsurf) | |||
1754 | } | 1754 | } |
1755 | 1755 | ||
1756 | static void | 1756 | static void |
1757 | shell_surface_set_fullscreen(struct wl_client *client, | 1757 | set_fullscreen(struct shell_surface *shsurf, |
1758 | struct wl_resource *resource, | 1758 | uint32_t method, |
1759 | uint32_t method, | 1759 | uint32_t framerate, |
1760 | uint32_t framerate, | 1760 | struct weston_output *output) |
1761 | struct wl_resource *output_resource) | ||
1762 | { | 1761 | { |
1763 | struct shell_surface *shsurf = resource->data; | ||
1764 | struct weston_surface *es = shsurf->surface; | 1762 | struct weston_surface *es = shsurf->surface; |
1765 | 1763 | ||
1766 | if (output_resource) | 1764 | if (output) |
1767 | shsurf->output = output_resource->data; | 1765 | shsurf->output = output; |
1768 | else if (es->output) | 1766 | else if (es->output) |
1769 | shsurf->output = es->output; | 1767 | shsurf->output = es->output; |
1770 | else | 1768 | else |
@@ -1781,6 +1779,24 @@ shell_surface_set_fullscreen(struct wl_client *client, | |||
1781 | } | 1779 | } |
1782 | 1780 | ||
1783 | static void | 1781 | static void |
1782 | shell_surface_set_fullscreen(struct wl_client *client, | ||
1783 | struct wl_resource *resource, | ||
1784 | uint32_t method, | ||
1785 | uint32_t framerate, | ||
1786 | struct wl_resource *output_resource) | ||
1787 | { | ||
1788 | struct shell_surface *shsurf = resource->data; | ||
1789 | struct weston_output *output; | ||
1790 | |||
1791 | if (output_resource) | ||
1792 | output = output_resource->data; | ||
1793 | else | ||
1794 | output = NULL; | ||
1795 | |||
1796 | set_fullscreen(shsurf, method, framerate, output); | ||
1797 | } | ||
1798 | |||
1799 | static void | ||
1784 | popup_grab_focus(struct wl_pointer_grab *grab, | 1800 | popup_grab_focus(struct wl_pointer_grab *grab, |
1785 | struct wl_surface *surface, | 1801 | struct wl_surface *surface, |
1786 | wl_fixed_t x, | 1802 | wl_fixed_t x, |
@@ -3832,6 +3848,7 @@ module_init(struct weston_compositor *ec) | |||
3832 | ec->shell_interface.create_shell_surface = create_shell_surface; | 3848 | ec->shell_interface.create_shell_surface = create_shell_surface; |
3833 | ec->shell_interface.set_toplevel = set_toplevel; | 3849 | ec->shell_interface.set_toplevel = set_toplevel; |
3834 | ec->shell_interface.set_transient = set_transient; | 3850 | ec->shell_interface.set_transient = set_transient; |
3851 | ec->shell_interface.set_fullscreen = set_fullscreen; | ||
3835 | ec->shell_interface.move = surface_move; | 3852 | ec->shell_interface.move = surface_move; |
3836 | ec->shell_interface.resize = surface_resize; | 3853 | ec->shell_interface.resize = surface_resize; |
3837 | 3854 | ||