Repository: qtile/qtile

Issue:
[ Xwayland ] Spotify doesn't respect Qtiles layouts ?
Using the latest git version of Qtile if I run Spotify from the aur it opens in a small floating window as pictured. If I press mod+f to fullscreen it then do the same again it starts to respect the monadtall layout and fills a window correctly.
![2022-01-29_21-01-1643492899](https://user-images.githubusercontent.com/1571498/151678680-8139e5ee-ec52-48e8-b67a-5bd19db899e6.jpg)
![2022-01-29_21-01-1643492916](https://user-images.githubusercontent.com/1571498/151678682-901db8e0-a093-4b95-8bde-5c442b9f8154.jpg)



Discussion:
I'm not actually sure if it's an Xwayland issue or just a Wayland issue as I know Spotify runs native in Wayland but for some reason still requires Xwayland support to run ?
I've tried other applications that use xwayland and they don't respect qtile layouts either, for example emacs 
![20220129_19h54m13s_grim](https://user-images.githubusercontent.com/9537788/151680201-e1ff2773-726b-4fd7-98af-cd5d31f436cf.png)

Hmm, very weird. Any chance they could be triggering float rules or something? Previously `wm_type` wasn't used by matches when the wayland backend was running but now that is available on xwayland windows. Otherwise my other idea is that the logic that determines whether or not they want to become static windows is wrong. Do these windows behave like regular floating windows (draggable, tilable), or are they completely static?
I'll look into wether they are triggering float rules in the morning. But I can confirm they are floating , draggable and you can tile them too. I can time Spotify by doing the following mod+f which obvs full screens the app then mod+f again and it's tilled correctly.
In my case it doesn't have any float rules. And the window can be dragged and enlarged with the mouse perfectly
OK thanks guys, I can reproduce and think I've understood what's going 
on. Will post a fix soon.

On Sat, Jan 29 2022 at 16:18:30 -0800, cr1ogen 
***@***.***> wrote:
> In my case it doesn't have any float rules. And the window can be 
> dragged and enlarged with the mouse perfectly
> 
> —
> Reply to this email directly, view it on GitHub, or unsubscribe.
> Triage notifications on the go with GitHub Mobile for iOS or Android.
> You are receiving this because you commented.Message ID: 
> ***@***.***>
> 




Resolving patch:
diff --git a/libqtile/backend/wayland/window.py b/libqtile/backend/wayland/window.py
--- a/libqtile/backend/wayland/window.py
+++ b/libqtile/backend/wayland/window.py
@@ -1082,6 +1082,7 @@ def place(
             else:
                 self.surface.configure(x, y, self._width, self._height)
             self.paint_borders(bordercolor, borderwidth)
+            self._find_outputs()
         self.damage()
 
     def cmd_bring_to_front(self) -> None:
@@ -1254,7 +1255,6 @@ def _on_map(self, _listener, _data):
             # Add event listeners
             self.add_listener(self.surface.surface.commit_event, self._on_commit)
             self.add_listener(self.surface.request_fullscreen_event, self._on_request_fullscreen)
-            self.add_listener(self.surface.request_configure_event, self._on_request_configure)
             self.add_listener(self.surface.set_title_event, self._on_set_title)
             self.add_listener(self.surface.set_class_event, self._on_set_class)
             self.add_listener(
@@ -1310,11 +1310,6 @@ def _on_request_fullscreen(self, _listener, _data):
         if self.qtile.config.auto_fullscreen:
             self.fullscreen = not self.fullscreen
 
-    def _on_request_configure(self, _listener, event: xwayland.SurfaceConfigureEvent):
-        logger.debug("Signal: xwindow request_configure")
-        self.surface.configure(event.x, event.y, event.width, event.height)  # type: ignore
-        self.floating = True
-
     def _on_set_title(self, _listener, _data):
         logger.debug("Signal: xwindow set_title")
         title = self.surface.title


Test patch: