Skip to content

Commit

Permalink
Not all windows have a floating attribute
Browse files Browse the repository at this point in the history
Fixes the following error when clicking on the bar:

2021-01-21 10:12:34,331 ERROR libqtile core.py:_xpoll():L295 Got an exception in poll loop
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/libqtile/backend/x11/core.py", line 263, in _xpoll
    ret = target(event)
  File "/usr/lib/python3.9/site-packages/libqtile/backend/x11/core.py", line 567, in handle_ButtonPress
    self.qtile.process_button_click(
  File "/usr/lib/python3.9/site-packages/libqtile/core/manager.py", line 748, in process_button_click
    self._focus_by_click(event)
  File "/usr/lib/python3.9/site-packages/libqtile/core/manager.py", line 704, in _focus_by_click
    self.config.bring_front_click != "floating_only" or window.floating
AttributeError: 'Internal' object has no attribute 'floating'

And this one when clicking on a dock window:

2021-01-21 10:12:55,684 ERROR libqtile core.py:_xpoll():L295 Got an exception in poll loop
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/libqtile/backend/x11/core.py", line 263, in _xpoll
    ret = target(event)
  File "/usr/lib/python3.9/site-packages/libqtile/backend/x11/core.py", line 567, in handle_ButtonPress
    self.qtile.process_button_click(
  File "/usr/lib/python3.9/site-packages/libqtile/core/manager.py", line 748, in process_button_click
    self._focus_by_click(event)
  File "/usr/lib/python3.9/site-packages/libqtile/core/manager.py", line 704, in _focus_by_click
    self.config.bring_front_click != "floating_only" or window.floating
AttributeError: 'NoneType' object has no attribute 'floating'

Related discussion: qtile#2122 (comment)
  • Loading branch information
ramnes committed Jan 21, 2021
1 parent dc95d81 commit c541b44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libqtile/core/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ def _focus_by_click(self, e):
window = self.windows_map.get(wid)

if self.config.bring_front_click and (
self.config.bring_front_click != "floating_only" or window.floating
self.config.bring_front_click != "floating_only" or getattr(window, "floating", False)
):
self.conn.conn.core.ConfigureWindow(
wid, xcffib.xproto.ConfigWindow.StackMode, [xcffib.xproto.StackMode.Above]
Expand Down

0 comments on commit c541b44

Please sign in to comment.