summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2016-11-02 17:55:01 +0100
committerRui Matos <tiagomatos@gmail.com>2017-02-21 19:51:16 +0100
commit1fe10f09d7703529cf2f051cdbf8891158e27556 (patch)
tree8674f984e37bbaf1f10a21203bd7dc42b7cccde7
parent328b4d24c6d7cef5c5833949339d9e4c6a6404ad (diff)
downloadmutter-1fe10f09d7703529cf2f051cdbf8891158e27556.tar.gz
wayland-xdg-shell: Handle the wl_output on the set_fullscreen request
This makes us fullscreen wayland windows on the requested monitor. https://bugzilla.gnome.org/show_bug.cgi?id=772525
-rw-r--r--src/wayland/meta-wayland-xdg-shell.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wayland/meta-wayland-xdg-shell.c b/src/wayland/meta-wayland-xdg-shell.c
index f26f3be9e..5d3b97b7d 100644
--- a/src/wayland/meta-wayland-xdg-shell.c
+++ b/src/wayland/meta-wayland-xdg-shell.c
@@ -28,6 +28,7 @@
#include "backends/meta-logical-monitor.h"
#include "core/window-private.h"
#include "wayland/meta-wayland.h"
+#include "wayland/meta-wayland-outputs.h"
#include "wayland/meta-wayland-popup.h"
#include "wayland/meta-wayland-private.h"
#include "wayland/meta-wayland-seat.h"
@@ -366,6 +367,13 @@ xdg_toplevel_set_fullscreen (struct wl_client *client,
{
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
+ if (output_resource)
+ {
+ MetaWaylandOutput *output = wl_resource_get_user_data (output_resource);
+ if (output)
+ meta_window_move_to_monitor (surface->window, output->logical_monitor->number);
+ }
+
meta_window_make_fullscreen (surface->window);
}