From ae76232c2cc07a6df1884bff1e59c266dc13baaa Mon Sep 17 00:00:00 2001 From: Gwanglim Lee Date: Mon, 9 Jun 2014 13:48:22 -0400 Subject: [PATCH] add fullscreen_set handler for wl_shell_surface Summary: fullscreen_set handler for wl_shell_surface Test Plan: 1. run e wayland only server with devilhons's branch source (devs/devilhorns/e_comp_wl) 2. run elementary_test -to "window states" 3. select fullscreen check box on elementary_test surface Reviewers: devilhorns, zmike, raster, stefan_schmidt Reviewed By: devilhorns CC: cedric Differential Revision: https://phab.enlightenment.org/D966 --- src/modules/wl_desktop_shell/e_mod_main.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c index bfdfa95a8..b12bcc3c6 100644 --- a/src/modules/wl_desktop_shell/e_mod_main.c +++ b/src/modules/wl_desktop_shell/e_mod_main.c @@ -212,9 +212,21 @@ _e_shell_surface_cb_transient_set(struct wl_client *client EINA_UNUSED, struct w } static void -_e_shell_surface_cb_fullscreen_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, uint32_t method EINA_UNUSED, uint32_t framerate EINA_UNUSED, struct wl_resource *output_resource EINA_UNUSED) +_e_shell_surface_cb_fullscreen_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, uint32_t method EINA_UNUSED, uint32_t framerate EINA_UNUSED, struct wl_resource *output_resource EINA_UNUSED) { DBG("SHELL: Surface Fullscreen Set"); + + E_Client *ec; + if (!(ec = wl_resource_get_user_data(resource))) + { + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, + "No Client For Shell Surface"); + return; + } + + if (!ec->lock_user_fullscreen) + e_client_fullscreen(ec, e_config->fullscreen_policy); } static void