qtile: current_screen_change doesn't fire when mousing to another screen

Issue description

If I set follow_mouse_focus = True, and move my mouse from one screen to another, the CurrentScreen widget still shows the new screen as inactive (red “I” by default).

It looks like the current_screen_change event doesn’t fire until I click.

Qtile version

cae69ccb9dd572abf5c3fe41a32c23ead36a7089

Logs

2021-01-12 16:53:52,887 DEBUG libqtile core.py:_xpoll():L259 EnterNotify
2021-01-12 16:53:52,888 DEBUG libqtile core.py:_xpoll():L262 Handling: EnterNotify
2021-01-12 16:53:52,890 DEBUG libqtile core.py:_xpoll():L259 MotionNotify
2021-01-12 16:53:52,891 DEBUG libqtile core.py:_xpoll():L262 Handling: MotionNotify
2021-01-12 16:53:52,894 DEBUG libqtile core.py:_xpoll():L259 MotionNotify
2021-01-12 16:53:52,894 DEBUG libqtile core.py:_xpoll():L262 Handling: MotionNotify
2021-01-12 16:53:52,903 DEBUG libqtile core.py:_xpoll():L259 MotionNotify
2021-01-12 16:53:52,903 DEBUG libqtile core.py:_xpoll():L262 Handling: MotionNotify
2021-01-12 16:53:52,909 DEBUG libqtile core.py:_xpoll():L259 MotionNotify
2021-01-12 16:53:52,910 DEBUG libqtile core.py:_xpoll():L262 Handling: MotionNotify
2021-01-12 16:53:52,917 DEBUG libqtile core.py:_xpoll():L259 LeaveNotify
2021-01-12 16:53:52,917 DEBUG libqtile core.py:_xpoll():L262 Handling: LeaveNotify
2021-01-12 16:53:52,918 DEBUG libqtile core.py:_xpoll():L259 EnterNotify
2021-01-12 16:53:52,918 INFO libqtile core.py:_get_target_chain():L338 Unhandled event: EnterNotify

(click)

2021-01-12 16:53:56,481 DEBUG libqtile core.py:_xpoll():L259 ButtonPress
2021-01-12 16:53:56,482 DEBUG libqtile core.py:_xpoll():L262 Handling: ButtonPress
2021-01-12 16:53:56,482 INFO libqtile manager.py:process_button_click():L708 Ignoring unknown button: 1
2021-01-12 16:53:56,482 DEBUG libqtile interface.py:call():L310 Command: function((<function Qtile.load_config.<locals>.noop at 0x7f9e5d5ec790>,), {})draw():L419 widget background=None
2021-01-12 16:53:56,483 DEBUG libqtile hook.py:fire():L393 Internal event: current_screen_change((), {})
2021-01-12 16:53:56,484 DEBUG libqtile hook.py:fire():L393 Internal event: setgroup((), {})

Configuration

https://github.com/mikelward/conf/tree/main/config/qtile

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

I think what’s happening is you are getting an EnterNotify event when you move the mouse from a window and onto the root window. Qtile previously tried to make sure that the .screen of that window was focussed, and failing that (if it was the root window), it would use the mouse’s coordinates to focus the screen. I’m guessing that by that point your mouse was on the other screen, thereby focussing it.

I agree that you would expect that behaviour when follow_mouse_focus = True so it was a bug conveniently hidden previously 😃