This is the window manager's job. The general principle is that the movement of the mouse will trigger many events. When the mouse leaves a window, the X server will trigger an event called LEAVE (I forgot the specific name, you can refer to the X protocol); when the mouse enters a window , the X server will trigger an event called ENTER. The window manager will capture all events. If the window manager wants the window that the mouse enters to gain focus, it will forward the event to the corresponding window, or send a focus acquisition event to the corresponding window. So if you want to achieve the function you want, you must either check whether the window manager has corresponding settings. If not, you can only modify the window manager code. gnome-shell has this function:) You can try it.
This is the window manager's job.
The general principle is that the movement of the mouse will trigger many events. When the mouse leaves a window, the X server will trigger an event called LEAVE (I forgot the specific name, you can refer to the X protocol); when the mouse enters a window , the X server will trigger an event called ENTER. The window manager will capture all events. If the window manager wants the window that the mouse enters to gain focus, it will forward the event to the corresponding window, or send a focus acquisition event to the corresponding window.
So if you want to achieve the function you want, you must either check whether the window manager has corresponding settings. If not, you can only modify the window manager code.
gnome-shell has this function:) You can try it.
For details, please refer to the X Agreement.
Or switch to openbox?