Repository: qtile/qtile

Issue:
Cairo-dock not showing in desktop with 0.18.0-2
# Issue description
Description in title

# Qtile version
0.18.1.dev0+g8e7ecc0a.d20210719

# Stack traces
[xsession-errors.log](https://github.com/qtile/qtile/files/6860109/xsession-errors.log)
[qtile.log](https://github.com/qtile/qtile/files/6860103/qtile.log)

# Configuration
[config.py.log](https://github.com/qtile/qtile/files/6860119/config.py.log)
[xinitrc.log](https://github.com/qtile/qtile/files/6860115/xinitrc.log)




Discussion:
I can reproduce. Seems to be these errors:
```
2021-07-22 06:34:09,680 ERROR libqtile core.py:_xpoll():L305 Got an exception in poll loop
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/libqtile/backend/x11/core.py", line 258, in _xpoll
    event = self.conn.conn.poll_for_event()
  File "/usr/lib/python3.9/site-packages/xcffib/__init__.py", line 571, in wrapper
    return f(*args)
  File "/usr/lib/python3.9/site-packages/xcffib/__init__.py", line 612, in poll_for_event
    return self.hoist_event(e)
  File "/usr/lib/python3.9/site-packages/xcffib/__init__.py", line 686, in hoist_event
    return self._process_error(ffi.cast("xcb_generic_error_t *", e))
  File "/usr/lib/python3.9/site-packages/xcffib/__init__.py", line 649, in _process_error
    raise error(buf)
xcffib.xproto.ValueError
2021-07-22 06:34:09,681 ERROR libqtile core.py:_xpoll():L305 Got an exception in poll loop
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/libqtile/backend/x11/core.py", line 258, in _xpoll
    event = self.conn.conn.poll_for_event()
  File "/usr/lib/python3.9/site-packages/xcffib/__init__.py", line 571, in wrapper
    return f(*args)
  File "/usr/lib/python3.9/site-packages/xcffib/__init__.py", line 612, in poll_for_event
    return self.hoist_event(e)
  File "/usr/lib/python3.9/site-packages/xcffib/__init__.py", line 686, in hoist_event
    return self._process_error(ffi.cast("xcb_generic_error_t *", e))
  File "/usr/lib/python3.9/site-packages/xcffib/__init__.py", line 649, in _process_error
    raise error(buf)
xcffib.xproto.ValueError
```

Anyone know what causes this? @elParaguayo did these errors crop up during the transparency work?
I don't think so. I saw `xcffib.xproto.MatchError` which happened when I tried to use the wrong visual depth but don't remember seeing `ValueError`.

That said, the transparency change seems to be the most likely candidate to have broken this!

EDIT: hmm, not 100% sure it is the transparency commit. I checked out a commit before that and still get the same ValueError. May need to do some bisecting.
Have bisected. Seems to be this commit: 689d142689
@GoVi-48 would you be able to test it with this patch? I think it might fix it.
```diff
diff --git a/libqtile/backend/x11/window.py b/libqtile/backend/x11/window.py
index 1a4c1b95..48be04e3 100644
--- a/libqtile/backend/x11/window.py
+++ b/libqtile/backend/x11/window.py
@@ -1387,6 +1387,7 @@ class Window(_Window, base.Window):
             self.group.remove(self)
         s = Static(self.window, self.qtile, screen, x, y, width, height)
         self.qtile.windows_map[self.window.wid] = s
+        self.unhide()
         hook.fire("client_managed", s)
 
     def tweak_float(self, x=None, y=None, dx=0, dy=0,

```
@m-col
Didn't work for me
I think I'm having similar issue with tint2 and polybar, they just don't render anything on them.
Are you able to confirm that it's the same commit that's responsible?
I can try to revert that commit if it is self-contained
Confirmed it's the same commit for `tint2`. Not checked `polybar` but it's looking likely.
Hey, I just switched from Xmonad to Polybar and I have the same issue. Any updates on this?
I think 3187b0c23a6dbe9b93ec2fd1473e59b84a74888e fixed this. Anyone able to confirm?
Sorry to be bearer of bad news but I don't think this fixes it.

Tried running `tint2` and got this:
![20210824_075008](https://user-images.githubusercontent.com/946265/130570250-8e7a85c2-e211-4529-b4c5-e3051986e7b1.png)

`xprop`:
```
WM_STATE(WM_STATE):
		window state: Normal
		icon window: 0x0
WM_NORMAL_HINTS(WM_SIZE_HINTS):
		program specified location: 788938160, 22057
		program specified minimum size: 1920 by 30
		program specified maximum size: 1920 by 30
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 1919
_NET_WM_STRUT(CARDINAL) = 0, 0, 0, 30
WM_CLASS(STRING) = "tint2", "Tint2"
XdndAware(ATOM) = ATOM
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x0, 0x0, 0x0
WM_HINTS(WM_HINTS):
		Client accepts input or input focus: False
_NET_WM_STATE(ATOM) = _NET_WM_STATE_SKIP_PAGER, _NET_WM_STATE_SKIP_TASKBAR, _NET_WM_STATE_STICKY, _NET_WM_STATE_ABOVE
_NET_WM_DESKTOP(CARDINAL) = 4294967295
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK
_NET_WM_PID(CARDINAL) = 23091
_NET_WM_ICON_NAME(UTF8_STRING) = "tint2"
_NET_WM_NAME(UTF8_STRING) = "tint2"
WM_ICON_NAME(STRING) = "tint2"
WM_NAME(STRING) = "tint2"
```
OK, looks like my solution doesn't quite work for all programs. I'll find a better one. But we're getting somewhere, if it's showing at all!

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
@@ -1104,14 +1104,12 @@ def __init__(self, win, qtile, screen,
         self.conf_y = y
         self.conf_width = width
         self.conf_height = height
-        x = x or 0
-        y = y or 0
+        x = x or self.x
+        y = y or self.y
         self.x = x + screen.x
         self.y = y + screen.y
-        self.width = width or 200
-        self.height = height or 200
         self.screen = screen
-        self.place(self.x, self.y, self.width, self.height, 0, 0)
+        self.place(self.x, self.y, width or self.width, height or self.height, 0, 0)
         self.unhide()
         self.update_strut()
 


Test patch: