You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
awesome v4.3-1248-g78c8f552 (Too long)
• Compiled against Lua 5.3.3 (running with Lua 5.3)
• API level: 4
• D-Bus support: yes
• xcb-errors support: no
• execinfo support: yes
• xcb-randr version: 1.6
• LGI version: 0.9.2
• Transparency enabled: yes
• Custom search paths: no
How to reproduce the issue:
Two monitor setup, default awesomewm configuration.
Right after startup, use awful.screen.focus_relative(1) to switch to second screen.
Call same function again to switch back but then the mouse will get stuck right in the middle of the two screens and wont move to either unless it is moved physically.
Actual result:
I applied the following patches on awesome code to see some debug information, and pinpoint where the problem is; it simply outputs the current mouse position, new mouse position, and the applied mouse position whenever we want to change the screen focus.
diff --git a/lib/awful/screen.lua b/lib/awful/screen.lua
index 8e6207ec..894928be 100644
--- a/lib/awful/screen.lua
+++ b/lib/awful/screen.lua
@@ -98,7 +98,10 @@ function screen.focus(_screen)
-- screen and pos for current screen
local s = get_screen(capi.mouse.screen)
- local pos
+ local pos = capi.mouse.coords()
+
+ gdebug.print_warning("--------------------Screen focus--------------------")
+ gdebug.print_warning(string.format("Current pos:\tscreen=%d,x=%d,y=%d\n", s.index, pos.x, pos.y))
if not _screen.mouse_per_screen then
-- This is the first time we enter this screen,
@@ -114,11 +117,14 @@ function screen.focus(_screen)
pos = _screen.mouse_per_screen
end
+ gdebug.print_warning(string.format("New pos:\tscreen=%d,x=%d,y=%d\n", _screen.index, pos.x, pos.y))
+
-- save pointer position of current screen
s.mouse_per_screen = capi.mouse.coords()
- -- move cursor without triggering signals mouse::enter and mouse::leave
- capi.mouse.coords(pos, true)
+ -- move cursor without triggering signals mouse::enter and mouse::leave
+ pos = capi.mouse.coords(pos, true)
+ gdebug.print_warning(string.format("Applied pos:\tscreen=%d,x=%d,y=%d\n", _screen.index, pos.x, pos.y))
local c = client.focus.history.get(_screen, 0)
if c then
@@ -1019,4 +1025,4 @@ object.properties(capi.screen, {
return screen
diff --git a/mouse.c b/mouse.c
index 42d0b382..a43bd097 100644
--- a/mouse.c
+++ b/mouse.c
@@ -138,6 +138,7 @@ mouse_query_pointer_root(int16_t *x, int16_t *y, xcb_window_t *child, uint16_t *
static inline void
mouse_warp_pointer(xcb_window_t window, int16_t x, int16_t y)
{
+ warn("Setting mouse to mouseX:%d, mouseY:%d with DistWindow:%d\n", x, y, window);
xcb_warp_pointer(globalconf.connection, XCB_NONE, window,
0, 0, 0, 0, x, y);
}
The output of the above is the following:
2021-12-14 14:48:59 W: awesome: --------------------Screen focus--------------------
2021-12-14 14:48:59 W: awesome: Current pos: screen=1,x=320,y=240
2021-12-14 14:48:59 W: awesome: New pos: screen=2,x=2695,y=-160
2021-12-14 14:48:59 W: awesome: mouse_warp_pointer:141: Setting mouse to mouseX:2695, mouseY:-160 with DistWindow:614
2021-12-14 14:48:59 W: awesome: Applied pos: screen=2,x=2695,y=0
2021-12-14 14:49:00 W: awesome: --------------------Screen focus--------------------
2021-12-14 14:49:00 W: awesome: Current pos: screen=2,x=2695,y=0
2021-12-14 14:49:00 W: awesome: New pos: screen=1,x=320,y=240
2021-12-14 14:49:00 W: awesome: mouse_warp_pointer:141: Setting mouse to mouseX:320, mouseY:240 with DistWindow:614
2021-12-14 14:49:00 W: awesome: Applied pos: screen=1,x=2560,y=240
2021-12-14 14:49:01 W: awesome: --------------------Screen focus--------------------
2021-12-14 14:49:01 W: awesome: Current pos: screen=2,x=2560,y=240
2021-12-14 14:49:01 W: awesome: New pos: screen=1,x=320,y=240
2021-12-14 14:49:01 W: awesome: mouse_warp_pointer:141: Setting mouse to mouseX:320, mouseY:240 with DistWindow:614
2021-12-14 14:49:01 W: awesome: Applied pos: screen=1,x=2560,y=240
2021-12-14 14:49:03 W: awesome: --------------------Screen focus--------------------
2021-12-14 14:49:03 W: awesome: Current pos: screen=2,x=2560,y=240
2021-12-14 14:49:03 W: awesome: New pos: screen=1,x=320,y=240
2021-12-14 14:49:03 W: awesome: mouse_warp_pointer:141: Setting mouse to mouseX:320, mouseY:240 with DistWindow:614
2021-12-14 14:49:03 W: awesome: Applied pos: screen=1,x=2560,y=240
As you can see, after the first xcb_warp_pointer .. no matter what pos we provide it will always apply screen=1,x=2560,y=240.
Expected result:
While debugging the issue myself, I am not sure if it is a awesomewm or a X11; in either way I would really appreciate help to know what triggers the bug in my case and how does everybody else (with different WMs for example) avoid it. Also if it is a know issue with X11.
Appendix:
I will give more detail here about my setup:
My screens setup is as follows:
(Dimensions on the sides and the red circle is where the mouse gets stuck)
I have an nvidia and the following in my xorg.conf.d/20-nvidia.conf
Also, I know similar issues exists in X11 that are related to the mouse, but I am not sure if I am triggering the same bug. In any how, I am not changing the acceleration or any of the settings except Xcursor.size: 16.
Since the issue also happens with the default awesomewm config, I think no need to provide my rc.lua file but let me know if you need it.
It is worth mentioning that the issue disappears once I move the mouse (physically) back and forth a couple of times between the screens. So the issue only happen right after start up but never after.
Thanks!
The text was updated successfully, but these errors were encountered:
Output of
awesome --version
:How to reproduce the issue:
awful.screen.focus_relative(1)
to switch to second screen.Actual result:
I applied the following patches on awesome code to see some debug information, and pinpoint where the problem is; it simply outputs the current mouse position, new mouse position, and the applied mouse position whenever we want to change the screen focus.
The output of the above is the following:
As you can see, after the first
xcb_warp_pointer
.. no matter what pos we provide it will always applyscreen=1,x=2560,y=240
.Expected result:
While debugging the issue myself, I am not sure if it is a awesomewm or a X11; in either way I would really appreciate help to know what triggers the bug in my case and how does everybody else (with different WMs for example) avoid it. Also if it is a know issue with X11.
Appendix:
I will give more detail here about my setup:
My screens setup is as follows:
(Dimensions on the sides and the red circle is where the mouse gets stuck)
I have an nvidia and the following in my xorg.conf.d/20-nvidia.conf
and on sddm Xsetup:
Also, I know similar issues exists in X11 that are related to the mouse, but I am not sure if I am triggering the same bug. In any how, I am not changing the acceleration or any of the settings except
Xcursor.size: 16
.Since the issue also happens with the default awesomewm config, I think no need to provide my rc.lua file but let me know if you need it.
It is worth mentioning that the issue disappears once I move the mouse (physically) back and forth a couple of times between the screens. So the issue only happen right after start up but never after.
Thanks!
The text was updated successfully, but these errors were encountered: