Repository: qtile/qtile

Issue:
Reaper freezes Qtile
Creating a thread here so I can track issues/progress.

Issue seems to be that reaper freezes qtile. When I tried it this morning mouse clicks didn't work and qtile keybindings didn't respond initially but it seemed like they were queued as they were suddenly all executed in a burst.

Needs some investigating.

Copying @JustineSmithies for any additional info...


Discussion:
I confirm that Reaper freezes Qtile but in Qtile Wayland it works, only the floating menus when I click do not remain open but close
If you put the logs into `DEBUG` mode, they are spammed continuously by reaper so it seems it's getting stuck in some sort of event loop. I can see a few errors in the logs too but not sure why we're getting them.
Does it happen in other WMs?
Apparently not:
```
[21:29] <JustineSmit> | elParaguayo: I have a long standing issue with an app that runs under every other tiling wm except qtile. It doesn't matter if it's X or
                      Wayland. You run Arch Linux don't you ? Would you try and run reaper-bin from the aur and see if you can tell why it goes mental with Qtile. If
                      you read the Reaper.fm forum and reddit others have had the same issues and just given up trying to run it
```
It also seems to kill the IPC server. It's quite something!

These are the error lines I'm seeing:
```
2022-02-03 18:10:34,569 DEBUG libqtile window.py:get_property():L405 X error in GetProperty (wid=48234789, prop='WM_HINTS'), ignoring
2022-02-03 18:10:34,569 DEBUG libqtile window.py:get_property():L405 X error in GetProperty (wid=48234789, prop='WM_NORMAL_HINTS'), ignoring
2022-02-03 18:10:34,569 DEBUG libqtile window.py:get_property():L405 X error in GetProperty (wid=48234789, prop='_NET_WM_WINDOW_TYPE'), ignoring
2022-02-03 18:10:34,570 DEBUG libqtile window.py:get_property():L405 X error in GetProperty (wid=48234789, prop='_NET_WM_WINDOW_TYPE'), ignoring
2022-02-03 18:10:34,570 DEBUG libqtile window.py:get_property():L405 X error in GetProperty (wid=48234789, prop='_NET_WM_WINDOW_TYPE'), ignoring
2022-02-03 18:10:34,570 DEBUG libqtile window.py:get_property():L405 X error in GetProperty (wid=48234789, prop='_NET_WM_WINDOW_TYPE'), ignoring
2022-02-03 18:10:34,571 DEBUG libqtile window.py:get_property():L405 X error in GetProperty (wid=48234789, prop='_NET_WM_WINDOW_TYPE'), ignoring
2022-02-03 18:10:34,571 DEBUG libqtile window.py:get_property():L405 X error in GetProperty (wid=48234789, prop='WM_TRANSIENT_FOR'), ignoring
2022-02-03 18:10:34,572 DEBUG libqtile window.py:set_property():L381 X error in SetProperty (wid=48234789, prop='_NET_FRAME_EXTENTS'), ignoring
2022-02-03 18:10:34,572 DEBUG libqtile window.py:set_property():L381 X error in SetProperty (wid=48234789, prop='WM_STATE'), ignoring
```
Other than that, log is continuously spammed with lines like this:
```
2022-02-04 18:39:45,046 DEBUG libqtile core.py:_xpoll():L301 X11 event: PropertyNotify (targets: 2)
2022-02-04 18:39:45,046 DEBUG libqtile core.py:_xpoll():L301 X11 event: ConfigureNotify (targets: 0)
2022-02-04 18:39:45,047 DEBUG libqtile core.py:_xpoll():L301 X11 event: PropertyNotify (targets: 2)
2022-02-04 18:39:45,047 DEBUG libqtile core.py:_xpoll():L301 X11 event: PropertyNotify (targets: 2)
2022-02-04 18:39:45,047 DEBUG libqtile core.py:_xpoll():L301 X11 event: ConfigureNotify (targets: 0)
2022-02-04 18:39:45,047 DEBUG libqtile core.py:_xpoll():L301 X11 event: PropertyNotify (targets: 2)
2022-02-04 18:39:45,048 DEBUG libqtile core.py:_xpoll():L301 X11 event: PropertyNotify (targets: 2)
2022-02-04 18:39:45,048 DEBUG libqtile core.py:_xpoll():L301 X11 event: ConfigureNotify (targets: 0)
2022-02-04 18:39:45,048 DEBUG libqtile core.py:_xpoll():L301 X11 event: PropertyNotify (targets: 2)
2022-02-04 18:39:45,048 DEBUG libqtile core.py:_xpoll():L301 X11 event: PropertyNotify (targets: 2)
2022-02-04 18:39:45,049 DEBUG libqtile core.py:_xpoll():L301 X11 event: ConfigureNotify (targets: 0)
2022-02-04 18:39:45,049 DEBUG libqtile core.py:_xpoll():L301 X11 event: PropertyNotify (targets: 2)
2022-02-04 18:39:45,050 DEBUG libqtile core.py:_xpoll():L301 X11 event: PropertyNotify (targets: 2)
2022-02-04 18:39:45,050 DEBUG libqtile core.py:_xpoll():L301 X11 event: ConfigureNotify (targets: 0)
2022-02-04 18:39:45,050 DEBUG libqtile core.py:_xpoll():L301 X11 event: PropertyNotify (targets: 2)
2022-02-04 18:39:45,050 DEBUG libqtile core.py:_xpoll():L301 X11 event: PropertyNotify (targets: 2)
2022-02-04 18:39:45,051 DEBUG libqtile core.py:_xpoll():L301 X11 event: ConfigureNotify (targets: 0)
2022-02-04 18:39:45,051 DEBUG libqtile core.py:_xpoll():L301 X11 event: PropertyNotify (targets: 2)
2022-02-04 18:39:45,051 DEBUG libqtile core.py:_xpoll():L301 X11 event: PropertyNotify (targets: 2)
2022-02-04 18:39:45,056 DEBUG libqtile hook.py:fire():L381 Internal event: client_focus((Window(name='REAPER v6.46 - EVALUATION LICENSE', wid=39846166),), {})
2022-02-04 18:39:45,057 DEBUG libqtile core.py:_xpoll():L301 X11 event: PropertyNotify (targets: 2)
2022-02-04 18:39:45,062 DEBUG libqtile hook.py:fire():L381 Internal event: client_focus((Window(name='REAPER v6.46 - EVALUATION LICENSE', wid=39846166),), {})
```
And it just doesn't stop.

Resolving patch:
diff --git a/libqtile/backend/x11/window.py b/libqtile/backend/x11/window.py
--- a/libqtile/backend/x11/window.py
+++ b/libqtile/backend/x11/window.py
@@ -619,6 +619,9 @@ def update_hints(self):
         except (xcffib.xproto.WindowError, xcffib.xproto.AccessError):
             return
 
+        width_inc = self.hints["width_inc"]
+        height_inc = self.hints["height_inc"]
+
         if normh:
             self.hints.update(normh)
 
@@ -633,9 +636,12 @@ def update_hints(self):
         if h and "InputHint" in h["flags"]:
             self.hints["input"] = h["input"]
 
-        if getattr(self, "group", None):
-            if self.group.floating_layout.match(self):
-                self.floating = True
+        if (
+            self.group
+            and self.floating
+            and width_inc != self.hints["width_inc"]
+            and height_inc != self.hints["height_inc"]
+        ):
             self.group.layout_all()
 
         return


Test patch: