Blame SOURCES/0001-wayland-xdg-shell-Handle-the-wl_output-on-the-set_fu.patch

67f8b7
From 4ee272a5a88351a03619deae4e5dd4ab16f32b07 Mon Sep 17 00:00:00 2001
67f8b7
From: Rui Matos <tiagomatos@gmail.com>
67f8b7
Date: Wed, 2 Nov 2016 17:55:01 +0100
67f8b7
Subject: [PATCH] wayland-xdg-shell: Handle the wl_output on the set_fullscreen
67f8b7
 request
67f8b7
67f8b7
This makes us fullscreen wayland windows on the requested monitor.
67f8b7
67f8b7
https://bugzilla.gnome.org/show_bug.cgi?id=772525
67f8b7
---
67f8b7
 src/wayland/meta-wayland-xdg-shell.c | 8 ++++++++
67f8b7
 1 file changed, 8 insertions(+)
67f8b7
67f8b7
diff --git a/src/wayland/meta-wayland-xdg-shell.c b/src/wayland/meta-wayland-xdg-shell.c
67f8b7
index 450acda..e1195c7 100644
67f8b7
--- a/src/wayland/meta-wayland-xdg-shell.c
67f8b7
+++ b/src/wayland/meta-wayland-xdg-shell.c
67f8b7
@@ -27,6 +27,7 @@
67f8b7
 
67f8b7
 #include "core/window-private.h"
67f8b7
 #include "wayland/meta-wayland.h"
67f8b7
+#include "wayland/meta-wayland-outputs.h"
67f8b7
 #include "wayland/meta-wayland-popup.h"
67f8b7
 #include "wayland/meta-wayland-private.h"
67f8b7
 #include "wayland/meta-wayland-seat.h"
67f8b7
@@ -363,6 +364,13 @@ xdg_toplevel_set_fullscreen (struct wl_client   *client,
67f8b7
 {
67f8b7
   MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
67f8b7
 
67f8b7
+  if (output_resource)
67f8b7
+    {
67f8b7
+      MetaWaylandOutput *output = wl_resource_get_user_data (output_resource);
67f8b7
+      if (output)
67f8b7
+        meta_window_move_to_monitor (surface->window, output->monitor_info->number);
67f8b7
+    }
67f8b7
+
67f8b7
   meta_window_make_fullscreen (surface->window);
67f8b7
 }
67f8b7
 
67f8b7
-- 
67f8b7
2.9.3
67f8b7