summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-05-10 03:22:43 +0200
committerBryce Harrington <bryce@osg.samsung.com>2016-05-19 17:52:46 -0700
commit28834b6472d763fae005a35d6e7a6c756ccced05 (patch)
tree06613bbf1e2405424f076ed31c3134f4f99e6d6c
parente6da35d0678797e7e592917545869b1eab33b8d0 (diff)
downloadweston-28834b6472d763fae005a35d6e7a6c756ccced05.tar.gz
desktop-shell: Don’t reconfigure an already fullscreen surface
When we receive an wl_shell_surface::set_fullscreen request for a surface that was already fullscreen, don’t do anything if the parameters are the same as the initial request. This prevents bogus or malicious clients from being able to always stay on front by flooding the compositor with set_fullscreen requests after the user has put them in the background with a mod+tab. Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
-rw-r--r--desktop-shell/shell.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 1c39a12d..7d5bca95 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -2561,6 +2561,13 @@ shell_surface_set_fullscreen(struct wl_client *client,
struct shell_surface *shsurf = wl_resource_get_user_data(resource);
struct weston_output *output;
+ if (shsurf->fullscreen_output == shsurf->output &&
+ shsurf->fullscreen.type == method &&
+ shsurf->fullscreen.framerate == framerate) {
+ send_configure_for_surface(shsurf);
+ return;
+ }
+
if (output_resource)
output = wl_resource_get_user_data(output_resource);
else