mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
Map new clients on the screen where the mouse pointer is
I was having this annoying issue with multi-head setups on d9b49f5
,
where new clients would always get mapped to the same screen (leftmost).
It seems that the x and y coordinate in the XWindowAttributes of new
clients are set to 0,0. The attached patch ignores these values and uses
the coordinates of the mouse pointer instead.
This commit is contained in:
parent
96350151b9
commit
ae406f51dc
1 changed files with 1 additions and 3 deletions
4
event.c
4
event.c
|
@ -452,9 +452,7 @@ handle_event_maprequest(XEvent * e, awesome_config *awesomeconf)
|
||||||
for(screen = 0; wa.screen != ScreenOfDisplay(e->xany.display, screen); screen++);
|
for(screen = 0; wa.screen != ScreenOfDisplay(e->xany.display, screen); screen++);
|
||||||
if(screen == 0)
|
if(screen == 0)
|
||||||
{
|
{
|
||||||
screen = get_screen_bycoord(e->xany.display, wa.x, wa.y);
|
if(XQueryPointer(e->xany.display, RootWindow(e->xany.display, screen),
|
||||||
if(screen == 0 &&
|
|
||||||
XQueryPointer(e->xany.display, RootWindow(e->xany.display, screen),
|
|
||||||
&dummy, &dummy, &x, &y, &d, &d, &m))
|
&dummy, &dummy, &x, &y, &d, &d, &m))
|
||||||
screen = get_screen_bycoord(e->xany.display, x, y);
|
screen = get_screen_bycoord(e->xany.display, x, y);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue